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 /Xi | |
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 'Xi')
-rw-r--r-- | Xi/exevents.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index e728310f8..74e49edb5 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1760,6 +1760,10 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device) switch (event->type) { case ET_KeyPress: + /* Don't deliver focus events (e.g. from KeymapNotify when running + * nested) to clients. */ + if (event->source_type == EVENT_SOURCE_FOCUS) + return; if (!grab && CheckDeviceGrabs(device, event, 0)) return; break; |