aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-10 13:28:22 +0200
committermarha <marha@users.sourceforge.net>2012-10-10 13:28:22 +0200
commit8c5587d9be904856f7e449a144c2819a8e310599 (patch)
treed25a9fb62aeac6bb6477ee7b0504ee3247a91e1f /xorg-server/dix
parentc48e25635aaafefec0c7761d5310f7d2071fc50c (diff)
downloadvcxsrv-8c5587d9be904856f7e449a144c2819a8e310599.tar.gz
vcxsrv-8c5587d9be904856f7e449a144c2819a8e310599.tar.bz2
vcxsrv-8c5587d9be904856f7e449a144c2819a8e310599.zip
xserver mesa git update 10 oct 2012
xserver: 4b7f00346daed20c96f3e8ea13ae411858a5424b mesa: 87a34131c427b40a561cfef1513b446a0eeabc39
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/events.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index c0e330b85..ddb5b343d 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1593,13 +1593,10 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd)
{
GrabPtr grab = keybd->deviceGrab.grab;
DeviceIntPtr dev;
- WindowPtr focusWin = keybd->focus ? keybd->focus->win
- : keybd->spriteInfo->sprite->win;
+ WindowPtr focusWin;
Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab &&
keybd->deviceGrab.implicitGrab);
- if (focusWin == FollowKeyboardWin)
- focusWin = inputInfo.keyboard->focus->win;
if (keybd->valuator)
keybd->valuator->motionHintWindow = NullWindow;
keybd->deviceGrab.grab = NullGrab;
@@ -1610,6 +1607,17 @@ DeactivateKeyboardGrab(DeviceIntPtr keybd)
if (dev->deviceGrab.sync.other == grab)
dev->deviceGrab.sync.other = NullGrab;
}
+
+ if (keybd->focus)
+ focusWin = keybd->focus->win;
+ else if (keybd->spriteInfo->sprite)
+ focusWin = keybd->spriteInfo->sprite->win;
+ else
+ focusWin = NullWindow;
+
+ if (focusWin == FollowKeyboardWin)
+ focusWin = inputInfo.keyboard->focus->win;
+
DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab);
if (!wasImplicit && grab->grabtype == XI2)