Commit 14b9131
committed
Fail gracefully instead of crashing if grab fails
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 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>1 parent 3a736d7 commit 14b9131
1 file changed
Lines changed: 27 additions & 4 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
| |||
101 | 112 | | |
102 | 113 | | |
103 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
104 | 118 | | |
105 | 119 | | |
106 | 120 | | |
| |||
446 | 460 | | |
447 | 461 | | |
448 | 462 | | |
449 | | - | |
| 463 | + | |
450 | 464 | | |
451 | 465 | | |
452 | 466 | | |
453 | | - | |
| 467 | + | |
454 | 468 | | |
455 | 469 | | |
456 | 470 | | |
| |||
473 | 487 | | |
474 | 488 | | |
475 | 489 | | |
476 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
477 | 500 | | |
0 commit comments