diff options
author | Daniel Stone <daniels@collabora.com> | 2015-11-20 15:37:30 +0000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-11-24 11:36:34 +1000 |
commit | 816015648ffe660ddaa0f7d4d192e555b723c372 (patch) | |
tree | 0053c4325903d20b09df2e35deb1579d76c344e9 /dix | |
parent | c3788394e9190130a8eed44c5c93eeb93c2a9893 (diff) |
Input: Add focus-in event source
Add a new event source type for keypress events synthesised from focus
notifications (e.g. KeymapNotify from the parent server, when running
nested). This is used to keep the keys-down array in sync with the host
server's, without sending actual keypress events to clients.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r-- | dix/getevents.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/dix/getevents.c b/dix/getevents.c index f04b415ef..4d06818cf 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -1101,6 +1101,11 @@ GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, } #endif + if (type == KeymapNotify) { + source_type = EVENT_SOURCE_FOCUS; + type = KeyPress; + } + /* refuse events from disabled devices */ if (!pDev->enabled) return 0; |