Repository navigation
Fix indicator popovers failing to open from keybindings on Wayland - #737
Open
mehdip2007 wants to merge 1 commit into
Open
mehdip2007 wants to merge 1 commit into
mehdip2007 wants to merge 1 commit into
Conversation
Forward-port of ae9b6d6 (branch fix-indicator-popovers-wayland, based on r794) to the current PopoverManager rewrite: - The popover is created with autohide disabled: GTK's autohide requests an xdg_popup grab, and Wayland only grants that grab against a recent input event serial. A popover opened from a keybinding (org.gnome.Shell accelerator activation / D-Bus activation) has received no input, so the compositor refuses the popup and it is never mapped. Clicking an indicator supplies a serial, which is why exactly one keyboard-triggered open succeeded after every click. Dismissal now happens when the panel toplevel loses keyboard focus (PopoverManager.close ()). - The popover is only reparented when it actually moves to a different indicator. Unparent+set_parent on every cycle destroys and recreates the popover surface, eventually leaving it visible but unmapped and ending in a Wayland protocol error. - get_panel () is guarded against a second request, which the compositor answers by terminating the client, and realize handling runs only once. - Keyboard focus is requested when a popover opens (panels are never focused automatically), with a roundtrip so the popup is created after focus is actually granted; without this, typing in the Applications Menu search field does not work.
Member
|
Thanks for your submission! Can you confirm that you did not use LLMs in accordance with our contributor guidelines? https://docs.elementary.io/contributor-guide/development/generative-ai-policy |
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.
Fixes #726
Problem
On Wayland, indicator popovers — including the Applications Menu — fail to open when triggered from a keybinding (e.g. the Super accelerator via
org.gnome.Shell/ D-Bus activation). Clicking an indicator works, but exactly one keyboard-triggered open succeeds after every click. After enough open/close cycles the popover can also end up visible but never drawn, and the panel eventually dies with a Wayland protocol error.Causes
autohide = true, which makes GTK request anxdg_popupgrab. Wayland only grants that grab against a recent input event serial, and a popover opened from a keybinding has received no input at all — so the compositor refuses the popup and it is never mapped. Clicking an indicator supplies a serial, which is why one keyboard-triggered open succeeded after every click.unparent ()+set_parent ()on every open/close destroys and recreates the popover surface, eventually leaving it visible but unmapped and ending in a Wayland protocol error.get_panel ()requested twice: realize can fire more than once; a secondget_panel ()request on the same surface makes the compositor terminate the client with a protocol error, taking the whole panel down.Changes
PopoverManager: create the popover withautohide = falseand dismiss it when the panel toplevel loses keyboard focus (PopoverManager.close ()), instead of relying on the grab.PopoverManager: only reparent the popover when it actually moves to a different indicator, and don't unparent on close.PanelWindow: guardget_panel ()against a second request and make realize handling run only once.PanelWindow: request keyboard focus when a popover opens, with a Wayland roundtrip so the popup is created after focus is actually granted — without this, typing in the Applications Menu search field does not work.Testing
Built and tested on Wayland: the Applications Menu now opens reliably from the Super key every time (not just once after each click), the search field accepts typing, and repeated open/close cycles across indicators no longer produce an unmapped popover or protocol errors.