Repository navigation
Conversation
…screen _getMetaWindowAtPointer() returned the topmost window actor whose frame rect contained the pointer, so a full-screen override-redirect overlay (such as Gromit-MPX's) was returned everywhere: focus() and raise() failed on it every tick and no other window got focused until the overlay went away. Pick the stage instead, which honours input regions and visibility, and leave the focus alone over override-redirect windows and the shell's own UI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EQfDZWMqKsLxtjj8ySMi1
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.
Problem. With focus on hover enabled, hover stops focusing windows for as long as an override-redirect window covers the pointer. Gromit-MPX, for example, keeps a full-screen, click-through overlay of this kind while it runs.
_getMetaWindowAtPointer()returns the topmost window actor whose frame rect contains the pointer, so it returns that overlay everywhere.focus()andraise()then fail on it on every 16 ms tick (meta_window_focus: assertion '!window->override_redirect' failed, and the same formeta_window_raise), and no other window gets focused. Hover only works again once the overlay goes away (for Gromit-MPX, when it quits), which looks like "focus on hover stopped working until reboot". I have found it through assertions in my journal, which started whenever Gromit-MPX started.I think #483 (hover to focus breaks password dialogs) is the same problem: the frame-rect lookup ignores the shell's own UI, so the loop keeps focusing the window under a shell dialog. With the pick, the dialog is what is under the pointer and the focus is left alone. I haven't tested that case.
Change.
_getMetaWindowAtPointer()now picks the stage at the pointer (global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y)) and walks up to theMeta.WindowActor. The pick honours input regions and only sees visible actors, so it returns the window that actually receives the pointer, and a click-through overlay no longer hides the window under it. Over an override-redirect window that does take input (a menu, a tooltip, Gromit-MPX while drawing), or over the shell's own UI, it returnsnulland the focus is left as it is.