(Backport to Gnome 44) Fail gracefully instead of crashing if grab fails with the error "Could not grab modal"#1032
Merged
jtaala merged 1 commit intopaperwm:gnome-44from May 17, 2025
Conversation
I have been using PaperWM on a daily basis for the past few months and it is great. One of the problems that I kept running into repeatedly was paperwm#991. This issue was reported on Gnome 47. I ran into this problem on Gnome 44. I attempted a naive fix which simply tries to clean-up all the state instead of crashing. This works well; I have been using a version of this fix, applied on top of the gnome-44 branch, for the past month and I have not suffered any `Could not grab modal` crashes. It would be great if I could get some guidance about whether this fix looks logical, and whether there might be a way to reproduce this code path somehow. We need to somehow get into `preview_navigate` (which happens when one uses a keyboard shortcut to switch windows, I believe?) but get there in a state where the keyboard is already grabbed by something else, thus causing PaperWM to fail to grab the keyboard. I would really like to fix this issue within PaperWM because I have not run into any other bug at all and this is a great project! Signed-off-by: Siddharth Kannan <mail@siddharthkannan.in>
274f05e to
14b9131
Compare
Collaborator
|
Thanks @icyflame! I don't use (or have access to) Gnome 44, but I'm happy to merge this one in given you've been running this for the last few weeks. |
Collaborator
|
This PR has now been merged into Gnome 44 branch, and released on extensions.gnome.org as well. https://github.com/paperwm/PaperWM/releases/tag/v44.18.1 Thanks. |
Author
|
Thanks a lot for merging this backport.
|
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.
Related to #991. This is backport of the PR to the PaperWM extension version targeting Gnome 44. The PR to the
developbranch is #1031. Please see that PR for more details.