No subject


Thu Jul 29 23:12:45 PDT 2010


"This is mainly to allow a touch screen to be used with netscape and other
browsers which do strange things if the mouse moves between button down and
button up."

CLOSED - NOTOURBUG

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xfree86/common/xf86Xinput.c       |   25 +------------------------
 hw/xfree86/common/xf86Xinput.h       |    8 --------
 hw/xfree86/doc/devel/Registry        |    1 -
 hw/xfree86/doc/man/xorg.conf.man.pre |    3 ---
 4 files changed, 1 insertions(+), 36 deletions(-)

diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 1f095d4..d45e3d1 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -276,17 +276,6 @@ ApplyAccelerationSettings(DeviceIntPtr dev){
     }
 }
 
-static Bool
-xf86SendDragEvents(DeviceIntPtr	device)
-{
-    LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate;
-    
-    if (device->button && device->button->buttonsDown > 0)
-        return local->flags & XI86_SEND_DRAG_EVENTS;
-    else
-        return TRUE;
-}
-
 /***********************************************************************
  *
  * xf86ProcessCommonOptions --
@@ -309,12 +298,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local,
         xf86Msg(X_CONFIG, "%s: always reports core events\n", local->name);
     }
 
-    if (xf86SetBoolOption(list, "SendDragEvents", 1)) {
-        local->flags |= XI86_SEND_DRAG_EVENTS;
-    } else {
-        xf86Msg(X_CONFIG, "%s: doesn't report drag events\n", local->name);
-    }
-
     /* Backwards compatibility. */
     local->history_size = GetMotionHistorySize();
 }
@@ -998,7 +981,6 @@ xf86PostMotionEventP(DeviceIntPtr	device,
                     int			*valuators)
 {
     int i = 0, nevents = 0;
-    Bool drag = xf86SendDragEvents(device);
     DeviceEvent *event;
     int flags = 0;
 
@@ -1045,12 +1027,7 @@ xf86PostMotionEventP(DeviceIntPtr	device,
 
     for (i = 0; i < nevents; i++) {
         event = (DeviceEvent*)((xf86Events + i)->event);
-        /* Don't post core motion events for devices not registered to send
-         * drag events. */
-        if (event->header == ET_Internal &&
-            (event->type != ET_Motion || drag)) {
-            mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event));
-        }
+        mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event));
     }
 }
 
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 7528a51..8ca912e 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -62,14 +62,6 @@
 #define XI86_ALWAYS_CORE	0x04 /* device always controls the pointer */
 /* the device sends Xinput and core pointer events */
 #define XI86_SEND_CORE_EVENTS	XI86_ALWAYS_CORE
-/* if the device is the core pointer or is sending core events, and
- * SEND_DRAG_EVENTS is false, and a buttons is done, then no motion events
- * (mouse drag action) are sent. This is mainly to allow a touch screen to be
- * used with netscape and other browsers which do strange things if the mouse
- * moves between button down and button up. With a touch screen, this motion
- * is common due to the user's finger moving slightly.
- */
-#define XI86_SEND_DRAG_EVENTS	0x08
 
 #define XI_PRIVATE(dev) \
 	(((LocalDevicePtr)((dev)->public.devicePrivate))->private)
diff --git a/hw/xfree86/doc/devel/Registry b/hw/xfree86/doc/devel/Registry
index 1fec230..e09228b 100644
--- a/hw/xfree86/doc/devel/Registry
+++ b/hw/xfree86/doc/devel/Registry
@@ -253,7 +253,6 @@ ReportDelay               I     I    ??
 ReportingMode             S     I    may be "raw" or "scaled"
 ScreenNumber              I     I    Screen number (for touch screen)
 SendCoreEvents            B     I    Send core events
-SendDragEvents            B     I    Send drag events
 StopBits                  I     I    Serial port stop bits
 SwapXY                    B     I    Swap the X and Y axes
 UntouchDelay              I     I    ??
diff --git a/hw/xfree86/doc/man/xorg.conf.man.pre b/hw/xfree86/doc/man/xorg.conf.man.pre
index 6b3636f..7c7a101 100644
--- a/hw/xfree86/doc/man/xorg.conf.man.pre
+++ b/hw/xfree86/doc/man/xorg.conf.man.pre
@@ -944,9 +944,6 @@ default. Devices with
 disabled will be \*qfloating\*q and only accessible by clients employing the
 X Input extension. This option controls the startup behavior only, a device
 may be reattached or set floating at runtime.
-.TP 7
-.BI "Option \*qSendDragEvents\*q  \*q" boolean \*q
-Send core events while dragging. Enabled by default.
 .PP
 For pointing devices, the following options control how the pointer
 is accelerated or decelerated with respect to physical device motion. Most of
-- 
1.7.2



More information about the xorg-devel mailing list