summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-11-11 15:28:50 +1000
committerAdam Jackson <ajax@redhat.com>2017-01-11 14:58:51 -0500
commit201ff45c2d7e6c7d73fd29d28871bb8b944074be (patch)
tree5c7b0d4a8f4da4a59dd2c3b6be41071e303efee3 /Xi
parent738c17b7ef4c70ad00c7bc01cf64edb770dda840 (diff)
Xi: when creating a new master device, update barries for all clients
The previous code only worked when the barrier was created by the same client as the one calling XIChangeDeviceHierarchy. http://bugzilla.redhat.com/show_bug.cgi?id=1384432 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com> (cherry picked from commit d6a6e1d6abb110ff00ad31b94cd29d92ca7c71a5)
Diffstat (limited to 'Xi')
-rw-r--r--Xi/xichangehierarchy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index 8d5b577b6..f2b7785ad 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -194,7 +194,8 @@ add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES])
flags[XTestptr->id] |= XISlaveAttached;
flags[XTestkeybd->id] |= XISlaveAttached;
- XIBarrierNewMasterDevice(client, ptr->id);
+ for (int i = 0; i < currentMaxClients; i++)
+ XIBarrierNewMasterDevice(clients[i], ptr->id);
unwind:
free(name);
@@ -300,7 +301,8 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES])
}
}
- XIBarrierRemoveMasterDevice(client, ptr->id);
+ for (int i = 0; i < currentMaxClients; i++)
+ XIBarrierRemoveMasterDevice(clients[i], ptr->id);
/* disable the remove the devices, XTest devices must be done first
else the sprites they rely on will be destroyed */