compositor-x11: Use XKB StateNotify to synchronise state
authorDaniel Stone <daniel@fooishbar.org>
Fri, 22 Jun 2012 12:21:39 +0000 (13:21 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 22 Jun 2012 15:52:07 +0000 (11:52 -0400)
commite2faa120efd897367439bf4ca733b9fa74407e26
tree8b969c1cd06ed1ff38eb947c2cebe1bd9c6ff4c8
parent05d58682b3c92cbff933685207bd061644e8a68f
compositor-x11: Use XKB StateNotify to synchronise state

Make sure that we always have the exact same view of the keyboard state
as the host server by using XKB StateNotify events to update our state
exactly rather than relying on key events.  In particular, this fixes
key state during grabs, where we either miss modifiers completely or get
them stuck permanently, depending on the nature of the grab and the
implementation of the X window manager/compositor.

The downside, however, is that Weston wakes up on every modifier change,
regardless of whether or not it has focus.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
src/compositor-x11.c