Repository navigation
fix(stlxdm): gave the focus back when a grabbing popup closes - #598
Merged
Merged
Conversation
A client closing its focused grabbing popup, as Qt's combo box does on a pick, left no window focused, so keys reached none until the next click. A window that took the focus meanwhile keeps it, at a press outside too.
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.
Summary
A client closing its focused grabbing popup (a menu or list that takes the focus as it opens), as Qt's combo box does on a pick, left stlxdm (the display manager) focusing no window, so keys reached none until the next click. The window the popup took the focus from gets it back when the popup closes still focused, unless a later grabbing popup, such as a submenu, opened meanwhile.
Changes
forget_window, which every destroyed window passes through, gives the focus to the window inm_focus_restore(the one focused before the popup opened) when the window destroyed is the grabbing popup and still holds the focus. A client's close, a press outside and a client's disconnect all reach this rule, so the press outside only dismisses the popup.route_untimed_pointerused to hand it back to the window the popup displaced.m_grab_popupandm_focus_restorehold one grabbing popup and the window it took the focus from, both replaced when the submenu opened, so the menu's close after its submenu's still leaves no window focused.