Tomas Janousek 91995df559 X.A.Submap, X.U.Ungrab: Sync after ungrab (fixes issues with runProcessWithInput)
When `runProcessWithInput` is invoked immediately after
`ungrabPointer`/`ungrabKeyboard`, we don't actually ungrab at all
because `runProcessWithInput` blocks and the ungrab requests wait in
Xlib's queue for a requests that needs a queue flush.

Common uses of `unGrab` (before `spawn`) aren't followed by a blocking
action, so the ungrab requests are flushed by xmonad's main loop, and
this is merely a timing issue—fork/exec takes a while and xmonad
probably manages to get back to its main loop in time. Uses of
`runProcessWithInput` in ordinary non-submap key bindings happen to work
because key bindings are passive grabs—the grab is released by the
user's fingers releasing the key itself, even if xmonad's ungrab
requests are stuck in a blocked queue. Submap key bindings, however,
take an active grab and therefore need to ungrab explicitly.

Easy fix—explicit `sync`.

Fixes: https://github.com/xmonad/xmonad/issues/313
2021-08-08 16:05:49 +01:00
..
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-10 14:03:52 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-15 08:51:02 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-18 14:10:23 +02:00
2021-06-18 14:10:23 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2019-10-08 10:33:56 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-06-18 14:10:23 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-18 14:10:23 +02:00
2021-06-18 14:10:23 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-18 14:10:23 +02:00