xorg-server: Changes to 'upstream-1.11+input'
dix/events.c | 5 +++--
dix/inpututils.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit ce03688df5447e6634667a32785276105c31230e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri Dec 16 12:41:08 2011 +1000
dix: button state must show the logical buttons, not physical buttons
If the device is mapped 3 2 1, a click on physical button 1 sends a button 3
press, but the state was set for button 1. Fix this, the state must be set
for that button's logical mapping.
https://bugzilla.gnome.org/show_bug.cgi?id=655928
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
(cherry picked from commit fcda98c48610fd507ca0b89c6006a5497d9dc1c9)
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/dix/inpututils.c b/dix/inpututils.c
index d062cbc..4f3a64e 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -671,7 +671,7 @@ void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event)
for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
if (BitIsOn(mouse->button->down, i))
- SetBit(event->buttons, i);
+ SetBit(event->buttons, mouse->button->map[i]);
if (kbd && kbd->key)
{
commit d2178c5f2931363c8626ee27352235aa5688931d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Mon Dec 19 14:52:41 2011 +1000
dix: don't retrieve the syncEvents tail on an empty list
An empty list points to itself but syncEvents has the list head only and is
of a different format than the elements. Thus, casting it to a QdEventPtr
gives us garbage.
Segfaults with XTS test case Xlib13/XGrabKeyboard
Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb.
Reported-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
(cherry picked from commit 47da6b6b2c2e9245422655f94770146fb8cd430b)
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
diff --git a/dix/events.c b/dix/events.c
index 8dff299..eb7bd92 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1115,13 +1115,14 @@ NoticeEventTime(InternalEvent *ev)
void
EnqueueEvent(InternalEvent *ev, DeviceIntPtr device)
{
- QdEventPtr tail;
+ QdEventPtr tail = NULL;
QdEventPtr qe;
SpritePtr pSprite = device->spriteInfo->sprite;
int eventlen;
DeviceEvent *event = &ev->device_event;
- tail = list_last_entry(&syncEvents.pending, QdEventRec, next);
+ if (!list_is_empty(&syncEvents.pending))
+ tail = list_last_entry(&syncEvents.pending, QdEventRec, next);
NoticeTime((InternalEvent*)event);
Reply to: