Fail gracefully instead of crashing if grab fails with the error "Could not grab modal"#1031
Open
icyflame wants to merge 1 commit intopaperwm:developfrom
Open
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>
Collaborator
|
See comments on #1032. Thanks @icyflame - I haven't seen this issue on later Gnome versions (e.g. current 47 etc.). Although, that may be due to how I use PaperWM etc. Let me know if succeed in seeing this issue in latest gnome and PaperWM. If so, I'm happy to run this branch for a few days just to make sure it doesn't introduce any other issues (and if not, can merge). Cheers. |
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.
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 #991. This issue was reported on Gnome 47. I ran into this problem on Gnome 42.9.
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 modalcrashes. I have backported this change to thegnome-44branch as well: #1032.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.Meanwhile, I will continue to use PaperWM daily on two machines (albeit with old Gnome versions: 3.38 and 42.9) I will attempt to get PaperWM up and running on a more recent version and check to see if I run into this crash on the default branch; if I do, then, I will also see whether this fix solves the crash.
I would really like to fix this issue within PaperWM (upstream) because I have not run into any other bug at all and this is a great project!