/[gentoo-x86]/x11-base/xorg-server/files/1.7.3.901-0001-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch
Gentoo

Contents of /x11-base/xorg-server/files/1.7.3.901-0001-dix-if-owner-events-is-true-for-passive-grabs-add-th.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Mar 18 18:42:47 2011 UTC (3 years, 5 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Drop unused patches.

(Portage version: 2.2.0_alpha26/cvs/Linux x86_64)

1 From 873ef3430e92b0756c0dbe5033f6aec38a20d6ad Mon Sep 17 00:00:00 2001
2 From: Peter Hutterer <peter.hutterer@who-t.net>
3 Date: Wed, 16 Dec 2009 13:43:22 +1000
4 Subject: [PATCH] dix: if owner-events is true for passive grabs, add the window mask (#25400)
5
6 A client requesting a GrabModeSync button grab, owner-events true, with only
7 the ButtonRelease mask set would never receive the press event even if the
8 grab window had the ButtonPress mask set.
9
10 The protocol requires that if owner-events is true, then the delivery mask
11 is the combination of the grab mask + the window event mask.
12
13 X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400>
14
15 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 ---
17 dix/events.c | 36 ++++++++++++++++++++++++++++++++++++
18 1 files changed, 36 insertions(+), 0 deletions(-)
19
20 diff --git a/dix/events.c b/dix/events.c
21 index 7e0867c..12b12a8 100644
22 --- a/dix/events.c
23 +++ b/dix/events.c
24 @@ -3590,6 +3590,8 @@ CheckPassiveGrabsOnWindow(
25 xE = &core;
26 count = 1;
27 mask = grab->eventMask;
28 + if (grab->ownerEvents)
29 + mask |= pWin->eventMask;
30 } else if (match & XI2_MATCH)
31 {
32 rc = EventToXI2((InternalEvent*)event, &xE);
33 @@ -3611,6 +3613,24 @@ CheckPassiveGrabsOnWindow(
34 mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
35 else if (event->type == XI_Enter || event->type == XI_FocusIn)
36 mask = grab->xi2mask[device->id][event->type/8];
37 +
38 + if (grab->ownerEvents && wOtherInputMasks(grab->window))
39 + {
40 + InputClientsPtr icp =
41 + wOtherInputMasks(grab->window)->inputClients;
42 +
43 + while(icp)
44 + {
45 + if (rClient(icp) == rClient(grab))
46 + {
47 + int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
48 + mask |= icp->xi2mask[device->id][evtype/8];
49 + break;
50 + }
51 +
52 + icp = icp->next;
53 + }
54 + }
55 } else
56 {
57 rc = EventToXI((InternalEvent*)event, &xE, &count);
58 @@ -3622,6 +3642,22 @@ CheckPassiveGrabsOnWindow(
59 continue;
60 }
61 mask = grab->eventMask;
62 + if (grab->ownerEvents && wOtherInputMasks(grab->window))
63 + {
64 + InputClientsPtr icp =
65 + wOtherInputMasks(grab->window)->inputClients;
66 +
67 + while(icp)
68 + {
69 + if (rClient(icp) == rClient(grab))
70 + {
71 + mask |= icp->mask[device->id];
72 + break;
73 + }
74 +
75 + icp = icp->next;
76 + }
77 + }
78 }
79
80 (*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
81 --
82 1.6.5.2

  ViewVC Help
Powered by ViewVC 1.1.20