aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-08 09:06:44 +0200
committermarha <marha@users.sourceforge.net>2012-10-08 09:06:44 +0200
commit9b15e1cfe4c6ca9862c2865c4adbc21a758e9734 (patch)
tree13452621f70604f08fd91b1bd46ed6341dbc2ea7 /xorg-server/dix/events.c
parentbd13c464f728719fceb8a4918b52727ec125ea6e (diff)
parentde8397bc3d010bba24ec0c4d2e6249a769a86fc7 (diff)
downloadvcxsrv-9b15e1cfe4c6ca9862c2865c4adbc21a758e9734.tar.gz
vcxsrv-9b15e1cfe4c6ca9862c2865c4adbc21a758e9734.tar.bz2
vcxsrv-9b15e1cfe4c6ca9862c2865c4adbc21a758e9734.zip
Merge remote-tracking branch 'origin/released'
* origin/released: pixman libxcb mesa xserver xkeyboard-config git update 8 oct 2012 Conflicts: xorg-server/Xext/xf86bigfont.c xorg-server/dix/dispatch.c xorg-server/include/dixstruct.h xorg-server/os/connection.c
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 005db808f..dd9dce7bb 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1558,11 +1558,13 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
WindowPtr oldWin;
/* slave devices need to float for the duration of the grab. */
- if (grab->grabtype == XI2 &&
+ if (grab->grabtype == XI2 && keybd->enabled &&
!(passive & ImplicitGrabMask) && !IsMaster(keybd))
DetachFromMaster(keybd);
- if (grabinfo->grab)
+ if (!keybd->enabled)
+ oldWin = NULL;
+ else if (grabinfo->grab)
oldWin = grabinfo->grab->window;
else if (keybd->focus)
oldWin = keybd->focus->win;
@@ -1572,7 +1574,8 @@ ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time,
oldWin = keybd->focus->win;
if (keybd->valuator)
keybd->valuator->motionHintWindow = NullWindow;
- DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
+ if (oldWin)
+ DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab);
if (syncEvents.playingEvents)
grabinfo->grabTime = syncEvents.time;
else