aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-08-30 15:40:11 +0200
committermarha <marha@users.sourceforge.net>2013-08-30 15:40:11 +0200
commit22bc825e9931f718cc0564aa55915961abaffce4 (patch)
treef53ea31eb5368d3f60860d3e8911fa83a7fd851a /xorg-server/dix
parentac46cfda36d6dbe8d5c092124a66ffe3f2bad15f (diff)
parent5ebbc3a366287b631775ed3e17537580d380db8a (diff)
downloadvcxsrv-22bc825e9931f718cc0564aa55915961abaffce4.tar.gz
vcxsrv-22bc825e9931f718cc0564aa55915961abaffce4.tar.bz2
vcxsrv-22bc825e9931f718cc0564aa55915961abaffce4.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa xserver xkeyboard-config xkbcomp git update 30 aug 2013
Diffstat (limited to 'xorg-server/dix')
-rw-r--r--xorg-server/dix/events.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index b2b770d1c..cfaf1ae3c 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -2108,6 +2108,7 @@ DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients,
{
int attempt;
enum EventDeliveryState rc = EVENT_NOT_DELIVERED;
+ Bool have_device_button_grab_class_client = FALSE;
for (; inputclients; inputclients = inputclients->next) {
Mask mask;
@@ -2127,13 +2128,21 @@ DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients,
events, count,
mask, filter, grab))) {
if (attempt > 0) {
- rc = EVENT_DELIVERED;
- *client_return = client;
- *mask_return = mask;
- /* Success overrides non-success, so if we've been
- * successful on one client, return that */
- }
- else if (rc == EVENT_NOT_DELIVERED)
+ /*
+ * The order of clients is arbitrary therefore if one
+ * client belongs to DeviceButtonGrabClass make sure to
+ * catch it.
+ */
+ if (!have_device_button_grab_class_client) {
+ rc = EVENT_DELIVERED;
+ *client_return = client;
+ *mask_return = mask;
+ /* Success overrides non-success, so if we've been
+ * successful on one client, return that */
+ if (mask & DeviceButtonGrabMask)
+ have_device_button_grab_class_client = TRUE;
+ }
+ } else if (rc == EVENT_NOT_DELIVERED)
rc = EVENT_REJECTED;
}
}
@@ -4650,7 +4659,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
filter = GetEventFilter(mouse, (xEvent *) event);
- if (grab) {
+ if (grab && grab->type == XI2) {
Mask mask;
mask = xi2mask_isset(grab->xi2mask, mouse, type);