aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xichangehierarchy.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-12 12:23:04 +0100
committermarha <marha@users.sourceforge.net>2011-12-12 12:23:04 +0100
commit5efb0a5e19b75137b7294b27f4e7878aeb8f0927 (patch)
treea8138a3cf2f3ed5beacd1ce9e44dda79b51f9ffd /xorg-server/Xi/xichangehierarchy.c
parent5b178ff5a5f0b6e481cf9fd9749eb7ef9581c987 (diff)
downloadvcxsrv-5efb0a5e19b75137b7294b27f4e7878aeb8f0927.tar.gz
vcxsrv-5efb0a5e19b75137b7294b27f4e7878aeb8f0927.tar.bz2
vcxsrv-5efb0a5e19b75137b7294b27f4e7878aeb8f0927.zip
libxtrans libX11 libxcb xserver mesa git update 12 dec 2011
Diffstat (limited to 'xorg-server/Xi/xichangehierarchy.c')
-rw-r--r--xorg-server/Xi/xichangehierarchy.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xorg-server/Xi/xichangehierarchy.c b/xorg-server/Xi/xichangehierarchy.c
index 614d23116..503404e64 100644
--- a/xorg-server/Xi/xichangehierarchy.c
+++ b/xorg-server/Xi/xichangehierarchy.c
@@ -200,6 +200,19 @@ unwind:
return rc;
}
+static void
+disable_clientpointer(DeviceIntPtr dev)
+{
+ int i;
+
+ for (i = 0; i < currentMaxClients; i++)
+ {
+ ClientPtr client = clients[i];
+ if (client && client->clientPtr == dev)
+ client->clientPtr = NULL;
+ }
+}
+
static int
remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
int flags[MAXDEVICES])
@@ -250,6 +263,8 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
if (rc != Success)
goto unwind;
+ disable_clientpointer(ptr);
+
/* Disabling sends the devices floating, reattach them if
* desired. */
if (r->return_mode == XIAttachToMaster)