Repository navigation
keybindings: Let the Super key end a mouse window move - #897
Open
SeniorMatt wants to merge 1 commit into
Open
SeniorMatt wants to merge 1 commit into
SeniorMatt wants to merge 1 commit into
Conversation
While a window is being moved with the mouse, all keys are grabbed on it, so process_key_event() skipped the modifier-only bindings. Pressing and releasing Super during a drag therefore never reached Cinnamon's menu key binding and the menu could not be opened. Even if it had, the shell cannot take its modal grab while a grab op is active. When Super is pressed and released on its own during a mouse move and has a binding, end the grab op first (the window stays where it is, as if the mouse button had been released) and then run the binding. Other modifiers, keyboard move/resize and the workspace shortcuts available during a mouse move are unchanged.
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.
While moving a window with the mouse, tapping Super does nothing: all keys are grabbed on the window during the drag, so modifier-only bindings are skipped (and Cinnamon couldn't take its modal grab during a grab op anyway).
Now, if Super alone is pressed and released during a mouse move and has a binding, the move ends where the window is (same as releasing the button) and the binding runs, so the menu opens. Other modifiers, keyboard move/resize, and the workspace shortcuts that work during a drag are unchanged.
Tested on a ThinkPad T14s Gen 2 (Mint 27, Wayland): tapping Super mid-drag drops the window and opens the menu.