compositor-x11: Use XKB StateNotify to synchronise state
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 <3d0f3b9ddcacec30c4008c5e030e6c13a478cb4f@fooishbar.org>

kwm81/weston,jonnylamb/weston,krezovic/weston,xorgy/weston,eyolfson/weston,giucam/weston,Fantu/compositor-spice,Gnurou/weston,Tarnyko/weston-xdg_surface_present,xorgy/weston,mchalupa/weston,krezovic/weston,udoprog/weston,Fantu/compositor-spice,mchalupa/weston,sir-murray/weston,Tarnyko/weston-xdg_surface_present,giucam/weston,sir-murray/weston,Gnurou/weston,eyolfson/weston,jonnylamb/weston,Fantu/compositor-spice,kwm81/weston,udoprog/weston