diff options
author | Thomas Jaeger <ThJaeger@gmail.com> | 2008-12-22 00:55:09 +0100 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-01-16 10:43:53 +1000 |
commit | f7f85f696570541e2dd43462675de9e6ee46f545 (patch) | |
tree | eb05b5dfa373ba42db768ba4c0dc48ea2f487a5e /include | |
parent | 6f065a26db62aaf1d7aab9f9a3d0e6cd09d1c1dd (diff) |
Count the number of logically down buttons in buttonsDown
This fixes the following bug. Assuming your window manager grabs
Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping,
then press the physical button 3 (this shouldn't have any effect), press
Alt and then button 1. The press event is delivered to the application
instead of firing the grab.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/inputstr.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/inputstr.h b/include/inputstr.h index 039d5bc23..adb7b9a40 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -185,7 +185,11 @@ typedef struct _ValuatorClassRec { typedef struct _ButtonClassRec { CARD8 numButtons; - CARD8 buttonsDown; /* number of buttons currently down */ + CARD8 buttonsDown; /* number of buttons currently down + This counts logical buttons, not + physical ones, i.e if some buttons + are mapped to 0, they're not counted + here */ unsigned short state; Mask motionMask; CARD8 down[DOWN_LENGTH]; |