diff options
author | Keith Packard <keithp@keithp.com> | 2014-01-22 11:33:53 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-01-22 11:33:53 -0800 |
commit | 25ebb9dbc9df659dec2bf6c27654a5bad2d11f94 (patch) | |
tree | 196d71c9136106382bc74302e4d3f88523812205 /Xi | |
parent | 409e8e29fbe16122ba5a4249256fc56e2e68ea93 (diff) | |
parent | 71baa466b1f6b02fe503f9a3089b7b9d61aa0f80 (diff) |
Merge remote-tracking branch 'whot/for-keith'
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 9d8416b4a..4ed58eec4 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1783,8 +1783,25 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device) DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent *) event, NullGrab, NullWindow, device); - if (deactivateDeviceGrab == TRUE) + if (deactivateDeviceGrab == TRUE) { (*device->deviceGrab.DeactivateGrab) (device); + + if (!IsMaster (device) && !IsFloating (device)) { + int flags, num_events = 0; + InternalEvent dce; + + flags = (IsPointerDevice (device)) ? + DEVCHANGE_POINTER_EVENT : DEVCHANGE_KEYBOARD_EVENT; + UpdateFromMaster (&dce, device, flags, &num_events); + BUG_WARN(num_events > 1); + + if (num_events == 1) + ChangeMasterDeviceClasses(GetMaster (device, MASTER_ATTACHED), + &dce.changed_event); + } + + } + event->detail.key = key; } |