aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-17 16:37:26 +0100
committermarha <marha@users.sourceforge.net>2011-11-17 16:37:26 +0100
commitd41bc08d1ae8c4784c09d8977816c0fadab1ba52 (patch)
tree4dc3081a9af0316eeee02356a44fcc2419e1b15e /xorg-server/dix/events.c
parent156e37d3879b316329e3e05579414031da2647e2 (diff)
downloadvcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.tar.gz
vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.tar.bz2
vcxsrv-d41bc08d1ae8c4784c09d8977816c0fadab1ba52.zip
xserver mesa git update 17 nov 2011
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index f87d2bbf9..5e0dc5f17 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -3698,10 +3698,7 @@ CheckPassiveGrabsOnWindow(
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
{
- if (IsPointerDevice(device))
- gdev = GetPairedDevice(device);
- else
- gdev = device;
+ gdev = GetMaster(device, KEYBOARD_OR_FLOAT);
} else if (grab->grabtype == GRABTYPE_XI2)
{
/* if the device is an attached slave device, gdev must be the
@@ -4000,8 +3997,7 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window)
}
/* just deliver it to the focus window */
- ptr = GetPairedDevice(keybd);
-
+ ptr = GetMaster(keybd, POINTER_OR_FLOAT);
rc = EventToXI2(event, &xi2);
if (rc == Success)
@@ -4501,7 +4497,7 @@ CoreEnterLeaveEvent(
GrabPtr grab = mouse->deviceGrab.grab;
Mask mask;
- keybd = GetPairedDevice(mouse);
+ keybd = GetMaster(mouse, KEYBOARD_OR_FLOAT);
if ((pWin == mouse->valuator->motionHintWindow) &&
(detail != NotifyInferior))
@@ -4719,10 +4715,7 @@ SetInputFocus(
}
time = ClientTimeToServerTime(ctime);
- if (IsKeyboardDevice(dev))
- keybd = dev;
- else
- keybd = GetPairedDevice(dev);
+ keybd = GetMaster(dev, KEYBOARD_OR_FLOAT);
if ((focusID == None) || (focusID == PointerRoot))
focusWin = (WindowPtr)(long)focusID;
@@ -5197,7 +5190,7 @@ ProcQueryPointer(ClientPtr client)
if (rc != Success && rc != BadAccess)
return rc;
- keyboard = GetPairedDevice(mouse);
+ keyboard = GetMaster(mouse, MASTER_KEYBOARD);
pSprite = mouse->spriteInfo->sprite;
if (mouse->valuator->motionHintWindow)
@@ -5321,7 +5314,7 @@ ProcSendEvent(ClientPtr client)
WindowPtr pWin;
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
DeviceIntPtr dev = PickPointer(client);
- DeviceIntPtr keybd = GetPairedDevice(dev);
+ DeviceIntPtr keybd = GetMaster(dev, MASTER_KEYBOARD);
SpritePtr pSprite = dev->spriteInfo->sprite;
REQUEST(xSendEventReq);
@@ -5594,7 +5587,7 @@ ProcGrabButton(ClientPtr client)
}
ptr = PickPointer(client);
- modifierDevice = GetPairedDevice(ptr);
+ modifierDevice = GetMaster(ptr, MASTER_KEYBOARD);
if (stuff->pointerMode == GrabModeSync ||
stuff->keyboardMode == GrabModeSync)
access_mode |= DixFreezeAccess;
@@ -5651,7 +5644,7 @@ ProcUngrabButton(ClientPtr client)
tempGrab.window = pWin;
tempGrab.modifiersDetail.exact = stuff->modifiers;
tempGrab.modifiersDetail.pMask = NULL;
- tempGrab.modifierDevice = GetPairedDevice(ptr);
+ tempGrab.modifierDevice = GetMaster(ptr, MASTER_KEYBOARD);
tempGrab.type = ButtonPress;
tempGrab.detail.exact = stuff->button;
tempGrab.grabtype = GRABTYPE_CORE;