wl: no keyboard grab while inactive
An activate and a deactivate in one batch left the grab taken with nothing active, which is the one state the grab must never be in: sway hands keys to the grab holder without asking whether the input method is active. sway cannot produce that batch -- relay_send_im_state sends a done after each -- so this is the table being total, not a bug that bit. The deactivate arm was already right; only the activate arm forgot to look at where the batch ended. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2
wl.c
2
wl.c
@@ -439,7 +439,7 @@ imdone(void*, struct zwp_input_method_v2*)
|
|||||||
leave();
|
leave();
|
||||||
else if(active && !washidden && hidden())
|
else if(active && !washidden && hidden())
|
||||||
flushpending();
|
flushpending();
|
||||||
if(activated)
|
if(activated && pendingactive)
|
||||||
grabkeyboard();
|
grabkeyboard();
|
||||||
else if(!pendingactive)
|
else if(!pendingactive)
|
||||||
releasegrab();
|
releasegrab();
|
||||||
|
|||||||
Reference in New Issue
Block a user