aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-30 08:08:23 +0100
committermarha <marha@users.sourceforge.net>2012-10-30 08:08:23 +0100
commit7b3f315a5d8b90dcb0db5512ed91fa700027cb7a (patch)
tree5d8a2f4983d9814c71325059d75e6de2af1a3b3e /xorg-server/dix
parent8d86f8c566c4181c846a872a5a2f88718e635a72 (diff)
downloadvcxsrv-7b3f315a5d8b90dcb0db5512ed91fa700027cb7a.tar.gz
vcxsrv-7b3f315a5d8b90dcb0db5512ed91fa700027cb7a.tar.bz2
vcxsrv-7b3f315a5d8b90dcb0db5512ed91fa700027cb7a.zip
fontconfig xserver mesa git update 30 oct 2012
fontconfig: bdaef0b80dc27f4ab7a9d9bcedcfd8b5724b3cfd xserver: 1ca096d5e07221025c4c4110528772b7d94f15ee mesa: 0a66ced8f822b0d5478b0cd6d72c1a6ad70647a2
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/devices.c1
-rw-r--r--xorg-server/dix/grabs.c2
-rw-r--r--xorg-server/dix/touch.c28
3 files changed, 30 insertions, 1 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index 66d440683..fd4916a3a 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -443,6 +443,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
if (*prev != dev)
return FALSE;
+ TouchEndPhysicallyActiveTouches(dev);
ReleaseButtonsAndKeys(dev);
SyncRemoveDeviceIdleTime(dev->idle_counter);
dev->idle_counter = NULL;
diff --git a/xorg-server/dix/grabs.c b/xorg-server/dix/grabs.c
index 55bf64f2c..fe7967415 100644
--- a/xorg-server/dix/grabs.c
+++ b/xorg-server/dix/grabs.c
@@ -179,7 +179,7 @@ UngrabAllDevices(Bool kill_client)
continue;
PrintDeviceGrabInfo(dev);
client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)];
- if (!client || client->clientGone)
+ if (!kill_client || !client || client->clientGone)
dev->deviceGrab.DeactivateGrab(dev);
if (kill_client)
CloseDownClient(client);
diff --git a/xorg-server/dix/touch.c b/xorg-server/dix/touch.c
index 497ad7dac..e64a6262c 100644
--- a/xorg-server/dix/touch.c
+++ b/xorg-server/dix/touch.c
@@ -1029,3 +1029,31 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
return TouchListenerAcceptReject(dev, ti, i, mode);
}
+
+/**
+ * End physically active touches for a device.
+ */
+void
+TouchEndPhysicallyActiveTouches(DeviceIntPtr dev)
+{
+ InternalEvent *eventlist = InitEventList(GetMaximumEventsNum());
+ int i;
+
+ OsBlockSignals();
+ mieqProcessInputEvents();
+ for (i = 0; i < dev->last.num_touches; i++) {
+ DDXTouchPointInfoPtr ddxti = dev->last.touches + i;
+
+ if (ddxti->active) {
+ int j;
+ int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id,
+ XI_TouchEnd, 0, NULL);
+
+ for (j = 0; j < nevents; j++)
+ mieqProcessDeviceEvent(dev, eventlist + j, NULL);
+ }
+ }
+ OsReleaseSignals();
+
+ FreeEventList(eventlist, GetMaximumEventsNum());
+}