[PATCH RFC inputproto] Provide convenience defines for owner_events.

Peter Hutterer peter.hutterer at who-t.net
Thu Jun 2 23:01:15 PDT 2011


No functional effect, just to improve readability of code.

It's not obvious what "True" or "False" stands for in a function with 11
arguments. Compare
    XIGrabButton(dpy, deviceid, button, grab_window, cursor,
                 GrabModeAsync, GrabModeSync, True,
                 event_mask, num_modifiers, &modifiers);
with
    XIGrabButton(dpy, deviceid, button, grab_window, cursor,
                 GrabModeAsync, GrabModeSync, XIOwnerEvents,
                 event_mask, num_modifiers, &modifiers);

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---

Man, I bet I'll get a nobel price for that.

 XI2.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/XI2.h b/XI2.h
index 1d0f399..aba5080 100644
--- a/XI2.h
+++ b/XI2.h
@@ -81,6 +81,10 @@
 #define XIGrabNotViewable                       3
 #define XIGrabFrozen                            4
 
+/* Grab owner events values */
+#define XIOwnerEvents                           True
+#define XINoOwnerEvents                         False
+
 /* Passive grab types */
 #define XIGrabtypeButton                        0
 #define XIGrabtypeKeycode                       1
-- 
1.7.5.1



More information about the xorg-devel mailing list