aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-22 14:27:38 +0100
committermarha <marha@users.sourceforge.net>2013-01-22 14:27:38 +0100
commit7002c66cfba01e7d3b88dae498a195f78f0e83f5 (patch)
tree2fbbd202a6a4243f0e64a8b22e22417a609ae19d /xorg-server/Xi/exevents.c
parent50c07563e17397daf040a32d8fdd3ab397e72371 (diff)
parent470f7ca9f0be348faf2f03fc16811844c5eeffce (diff)
downloadvcxsrv-7002c66cfba01e7d3b88dae498a195f78f0e83f5.tar.gz
vcxsrv-7002c66cfba01e7d3b88dae498a195f78f0e83f5.tar.bz2
vcxsrv-7002c66cfba01e7d3b88dae498a195f78f0e83f5.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libfontenc mesa mkfontscale pixman xserver xkeyboard-config Conflicts: mesalib/src/mesa/main/syncobj.c mesalib/src/mesa/main/syncobj.h xorg-server/hw/xwin/winconfig.c xorg-server/hw/xwin/winmultiwindowwndproc.c
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c38
1 files changed, 10 insertions, 28 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 6d5443341..2ff2471c5 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1189,7 +1189,6 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
TouchOwnershipEvent *ev)
{
Bool was_owner = (resource == ti->listeners[0].listener);
- void *grab;
int i;
/* Send a TouchEnd event to the resource being removed, but only if they
@@ -1204,11 +1203,7 @@ TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource,
/* Remove the resource from the listener list, updating
* ti->num_listeners, as well as ti->num_grabs if it was a grab. */
- if (TouchRemoveListener(ti, resource)) {
- if (dixLookupResourceByType(&grab, resource, RT_PASSIVEGRAB,
- serverClient, DixGetAttrAccess) == Success)
- ti->num_grabs--;
- }
+ TouchRemoveListener(ti, resource);
/* If the current owner was removed and there are further listeners, deliver
* the TouchOwnership or TouchBegin event to the new owner. */
@@ -1302,34 +1297,19 @@ RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (listener->type == LISTENER_GRAB ||
listener->type == LISTENER_POINTER_GRAB) {
- rc = dixLookupResourceByType((pointer *) grab, listener->listener,
- RT_PASSIVEGRAB,
- serverClient, DixSendAccess);
- if (rc != Success) {
- /* the grab doesn't exist but we have a grabbing listener - this
- * is an implicit/active grab */
- rc = dixLookupClient(client, listener->listener, serverClient,
- DixSendAccess);
- if (rc != Success)
- return FALSE;
-
- *grab = dev->deviceGrab.grab;
- if (!*grab)
- return FALSE;
- }
+
+ *grab = listener->grab;
+
+ BUG_RETURN_VAL(!*grab, FALSE);
*client = rClient(*grab);
*win = (*grab)->window;
*mask = (*grab)->xi2mask;
}
else {
- if (listener->level == CORE)
- rc = dixLookupWindow(win, listener->listener,
- serverClient, DixSendAccess);
- else
- rc = dixLookupResourceByType((pointer *) win, listener->listener,
- RT_INPUTCLIENT,
- serverClient, DixSendAccess);
+ rc = dixLookupResourceByType((pointer *) win, listener->listener,
+ listener->resource_type,
+ serverClient, DixSendAccess);
if (rc != Success)
return FALSE;
@@ -1469,6 +1449,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
*/
l = &ti->listeners[ti->num_listeners - 1];
l->listener = devgrab->resource;
+ l->grab = devgrab;
+ //l->resource_type = RT_NONE;
if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin)
l->type = LISTENER_POINTER_GRAB;