From 5ebbc3a366287b631775ed3e17537580d380db8a Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 30 Aug 2013 15:35:17 +0200 Subject: fontconfig mesa xserver xkeyboard-config xkbcomp git update 30 aug 2013 xserver commit 94d4e29aedc69431fa9b299ca1b67947173d7a24 xkeyboard-config commit fcb91cb1013cbdd87a6f77533f188d5934f24046 xkbcomp commit 24d18e0a844041ef82441adb16aa18cc4b4814ae fontconfig commit 071ce44c35733e54cb477cc75810cbe55025b619 mesa commit f7217b99f243738f941a5d009c68387dfadcb50a --- xorg-server/dix/events.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'xorg-server/dix/events.c') diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index ed3138d07..086601a69 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -2105,6 +2105,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; @@ -2124,13 +2125,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; } } @@ -4644,7 +4653,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); -- cgit v1.2.3