Problem:
Dialogs tend to anchor to topleft of window- or (0,0) coords, however it depends on the wayland compositor and is highly inconsistent.
gtk3 docs note on wayland issue:
https://docs.gtk.org/gtk3/method.Window.get_position.html
Solution:
https://docs.gtk.org/gtk3/class.Overlay.html
GtkOverlay avoids toplevel window positioning as a child widget.
TODO:
:promptfind GUI Find/Replace dialog.Keyboard shortcuts
Special handling of textinput:
Text input fields like inputdialog() are special-handled in this solution. This is because buttons can grab a single GdkEventKey and override it. A Text input field should own key input.
This means focus-switching, key-input is special-handled for text- input in particular.
However, it is mostly because Vim drives the gtk3 GUI via the highly unconventional g_main_context_iteration, which works basically like a clock or pedals for emptying the GLib(and gtk3) event loop.
Thus, there are no clean solutions without major refactoring.
Resources:
gtk3 default Adwaita theme @-rules defs for integrating to theme. https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/gtk-contained.css https://docs.gtk.org/gtk3/css-overview.html
https://github.com/vim/vim/pull/20738
(3 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Opening another draft PR, since this is out of scope of the original PR. The original PR attempts to fix the loss of focus of the dialogs.
Screenshots:
Unsaved changes
image.png (view on web)
:call inputdialog('wow')
image.png (view on web)
:call confirm('Body message', "&OK\n&Cancel", 1, 'Question')
image.png (view on web)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()