feat: Wayland detection, text sizing fix, signal handling#314
Open
mg-dev25 wants to merge 1 commit intov1cont:masterfrom
Open
feat: Wayland detection, text sizing fix, signal handling#314mg-dev25 wants to merge 1 commit intov1cont:masterfrom
mg-dev25 wants to merge 1 commit intov1cont:masterfrom
Conversation
Core improvements to YAD: Wayland Detection: - Add yad_check_x11() and yad_check_wayland() functions - Detect display backend at startup using GDK macros - Warn when using X11-only features on Wayland: * --posx/--posy positioning (compositor-controlled on Wayland) * --mouse positioning (not supported on Wayland) * --plug mode (requires X11) * notebook/paned/notification modes (X11-only) * color picker (screen capture requires X11 or portal) - Provide guidance for GDK_BACKEND=x11 workaround Text Sizing Fix: - Add text_size_allocate_cb() callback for proper line wrapping - Set width request on size-allocate to enable text wrap - Constrain label max_width_chars when --width specified - Connect size-allocate signal when --geometry or --width used - Prevents windows from becoming excessively large with long text Signal Handling: - Add sa_term() handler for SIGTERM and SIGINT - Enable graceful shutdown instead of immediate termination - Properly exit with CANCEL response (1) on signals Footer Widget Support: - Retrieve footer widget from dialog data (set by form.c) - Pack into button box as secondary, non-homogeneous child - Enables @footer@ form fields feature Fixes v1cont#107, v1cont#140, v1cont#32, v1cont#297, v1cont#300 Addresses v1cont#159, v1cont#261, v1cont#158, v1cont#216, v1cont#49, v1cont#181
Owner
|
hi and thank you. but can you split your pr into a separate parts which fixes different issues? and some comments:
|
mg-dev25
added a commit
to Mgdev-25/yad
that referenced
this pull request
Dec 2, 2025
Per maintainer feedback on PR v1cont#312: - AppIndicator should be a separate dialog type, not combined with notification - Code follows html.c pattern: separate file conditionally compiled Changes: - Add src/appindicator.c with yad_appindicator_run() - Add --indicator option for StatusNotifier/AppIndicator support - Add AM_CONDITIONAL([APPINDICATOR], ...) in configure.ac - Add if APPINDICATOR block in Makefile.am - Add YAD_MODE_APPINDICATOR enum value Also incorporates PR v1cont#314 maintainer feedback: - Remove is_wayland variable (use !is_x11 instead) - Remove yad_check_wayland() (use !yad_check_x11() instead) - Remove sa_term() handler (use existing sa_usr2() for SIGTERM/SIGINT) Fixes v1cont#172, v1cont#86, v1cont#246, v1cont#244 (AppIndicator) Addresses v1cont#159, v1cont#261, v1cont#158 (Wayland) Addresses v1cont#181 (Signal handling)
mg-dev25
added a commit
to Mgdev-25/yad
that referenced
this pull request
Dec 2, 2025
Per maintainer feedback on PR v1cont#314: - No need for is_wayland/yad_check_wayland when is_x11 already exists - Use !yad_check_x11() for Wayland detection - Update cpicker.c and print.c to use simplified API
Contributor
Author
|
Closing per maintainer feedback to split into separate atomic changes. The Wayland API simplification (using existing The signal handling improvements (using existing Thanks for the feedback! |
mg-dev25
added a commit
to Mgdev-25/yad
that referenced
this pull request
Dec 2, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
mg-dev25
added a commit
to Mgdev-25/yad
that referenced
this pull request
Dec 2, 2025
Adds handlers for SIGTERM and SIGINT signals using the existing sa_usr2() handler, which cleanly exits with YAD_RESPONSE_CANCEL. This allows scripts to properly terminate YAD dialogs when interrupted (Ctrl+C) or when receiving SIGTERM from process managers. Follows feedback from PR v1cont#314 about reusing existing handlers instead of creating new ones.
mg-dev25
added a commit
to Mgdev-25/yad
that referenced
this pull request
Dec 2, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
mg-dev25
added a commit
to mg-dev25/yad
that referenced
this pull request
Dec 10, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
mg-dev25
added a commit
to mg-dev25/yad
that referenced
this pull request
Dec 10, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
mg-dev25
added a commit
to mg-dev25/yad
that referenced
this pull request
Dec 10, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
mg-dev25
added a commit
to mg-dev25/yad
that referenced
this pull request
Dec 10, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
mg-dev25
added a commit
to mg-dev25/yad
that referenced
this pull request
Dec 10, 2025
Adds a simple API for checking if running on X11 display server. Used by cpicker.c and print.c to warn about or skip X11-only features. Changes: - Add yad_check_x11() in main.c returning the is_x11 variable - Add declaration in yad.h - cpicker.c: Warn and skip color picker on non-X11 (needs screen grab) - print.c: Skip mouse positioning on Wayland (compositor-controlled) Addresses feedback from PR v1cont#314 about simplifying Wayland detection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combined improvements
This commit addresses multiple related issues:
1. Wayland backend detection and warnings
Addresses #159, #261, #158, #216, #49
On Wayland, X11-only features now show clear warnings instead of failing silently:
2. Text sizing fix
Fixes #107, #140, #32, #297, #300
Dialog windows no longer grow excessively large when --text contains long content with --wrap enabled. The --width and --geometry options now properly constrain text.
3. Graceful signal handling
Addresses #181
SIGTERM/SIGINT now trigger graceful exit instead of abrupt termination.
Files changed
Test