[PATCH] Focus event button state must show the logical buttons, not physical buttons

Chase Douglas chase.douglas at canonical.com
Sat Feb 11 07:58:38 PST 2012


From: Chase Douglas <chase.douglas at ubuntu.com>

Similar to the fix in fcda98c48610fd507ca0b89c6006a5497d9dc1c9. This
ensures we show the correct logical state of the buttons in device focus
events too.

Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
 Xi/exevents.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 6b2db4b..47da1cc 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -2203,7 +2203,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
 
     for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
         if (BitIsOn(mouse->button->down, i))
-            SetBit(&xi2event[1], i);
+            SetBit(&xi2event[1], mouse->button->map[i]);
 
     if (dev->key)
     {
-- 
1.7.8.3



More information about the xorg-devel mailing list