xserver: Branch 'master'

Zephaniah E. Hull warp at kemper.freedesktop.org
Mon Jun 4 06:09:17 PDT 2007


 hw/xfree86/common/xf86Xinput.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

New commits:
diff-tree 75dece08fb72803d5116e6776e9f1534ff20e37b (from fbb9b203950e9d0e82574cde5b3e006b0e6b404f)
Author: Zephaniah E. Hull <warp at agamemnon.b5>
Date:   Mon Jun 4 09:09:20 2007 -0400

    xf86PostMotionEvents[P] calls xf86SendDragEvents, xf86SendDragEvents
    unconditionally checks device->button->buttonsDown.
    
    Let's make it possible to have a device with motion, but no buttons.
    
    Without segfaulting.

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 207e792..5430020 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -101,7 +101,7 @@ xf86SendDragEvents(DeviceIntPtr	device)
 {
     LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate;
     
-    if (device->button->buttonsDown > 0)
+    if (device->button && device->button->buttonsDown > 0)
         return (local->flags & XI86_SEND_DRAG_EVENTS);
     else
         return (TRUE);


More information about the xorg-commit mailing list