Report which components of the state have changed
authorRan Benita <ran234@gmail.com>
Mon, 22 Oct 2012 19:00:57 +0000 (21:00 +0200)
committerRan Benita <ran234@gmail.com>
Mon, 22 Oct 2012 19:58:03 +0000 (21:58 +0200)
commit4b81c9f3e31a5128d4c9f55696f684948e5ad3f1
treefb411faf3fbdd6eb0b996cab0e10f1f65fb3a735
parent550cb24d3c0a27815f7dd48324208baed72cb281
Report which components of the state have changed

We add a return value to the xkb_state_update_key and
xkb_state_update_mask, which reports to the caller which of the state
components have changed as a result.

This restores the XKB functionality of the XkbStateNotify and
XkbIndicatorsStateNotify events. See:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Events
It is quite useful in some situations. For example, it allows an
application to avoid doing some work if nothing of relevance in the
state has changed. Say, a keyboard layout applet. Also useful for
debugging.

The deltas themselves are not provided, because I can't see a use case.
If needed, it should be possible to add some API for that.

In xkbcommon, keymaps are immutable, so all of the other *Notify events
from XKB are irrelevant.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/state.c
xkbcommon/xkbcommon.h