From 8884a73a3f4efa8276c5e38b9573201574c4f1f6 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 27 Nov 2006 22:39:56 +0200 Subject: xfree86/input: re-add support for disabling drag events --- hw/xfree86/common/xf86Xinput.c | 51 ++++++++---------------------------------- 1 file changed, 9 insertions(+), 42 deletions(-) (limited to 'hw/xfree86/common') diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index be3368dff..16e330d43 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -90,16 +90,6 @@ #include "mi.h" -/****************************************************************************** - * debugging macro - *****************************************************************************/ -#ifdef DEBUG -static int debug_level = 0; -#define DBG(lvl, f) {if ((lvl) <= debug_level) f;} -#else -#define DBG(lvl, f) -#endif - xEvent *xf86Events = NULL; static Bool @@ -140,33 +130,6 @@ xf86ProcessCommonOptions(LocalDevicePtr local, } } -void -xf86AlwaysCoreControl(DeviceIntPtr pDev, IntegerCtrl *control) -{ -} - -/*********************************************************************** - * - * xf86XinputFinalizeInit -- - * - * Create and initialize an integer feedback to control the always - * core feature. - * - *********************************************************************** - */ -void -xf86XinputFinalizeInit(DeviceIntPtr dev) -{ - LocalDevicePtr local = (LocalDevicePtr)dev->public.devicePrivate; - - if (InitIntegerFeedbackClassDeviceStruct(dev, xf86AlwaysCoreControl) == FALSE) { - ErrorF("Unable to init integer feedback for always core feature\n"); - } else { - local->always_core_feedback = dev->intfeed; - dev->intfeed->ctrl.integer_displayed = (local->flags & XI86_ALWAYS_CORE) ? 1 : 0; - } -} - /*********************************************************************** * * xf86ActivateDevice -- @@ -193,8 +156,6 @@ xf86ActivateDevice(LocalDevicePtr local) dev->public.devicePrivate = (pointer) local; local->dev = dev; - xf86XinputFinalizeInit(dev); - dev->coreEvents = local->flags & XI86_ALWAYS_CORE; RegisterOtherDevice(dev); @@ -435,9 +396,9 @@ xf86PostMotionEvent(DeviceIntPtr device, va_list var; int i = 0, nevents = 0; Bool drag = xf86SendDragEvents(device); - LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate; int *valuators = NULL; int flags = 0; + xEvent *xE = NULL; if (is_absolute) flags = POINTER_ABSOLUTE; @@ -460,8 +421,14 @@ xf86PostMotionEvent(DeviceIntPtr device, flags, first_valuator, num_valuators, valuators); - for (i = 0; i < nevents; i++) - mieqEnqueue(device, xf86Events + i); + for (i = 0; i < nevents; i++) { + xE = xf86Events + i; + /* Don't post core motion events for devices not registered to send + * drag events. */ + if (xE->u.u.type != MotionNotify || drag) { + mieqEnqueue(device, xf86Events + i); + } + } xfree(valuators); } -- cgit v1.2.3 From 729fca33a417ae3dfb180caf0ea8946ef9eee1df Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 7 Dec 2006 12:09:18 +0100 Subject: Revert "xfree86 DDX: Delete DDX screens in ddxGiveUp()." This reverts commit a6381e69845f58d2b3282992b1f881015190f1bc. See https://bugs.freedesktop.org/show_bug.cgi?id=9224 . --- hw/xfree86/common/xf86Init.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'hw/xfree86/common') diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 68d69c51c..ff878d59c 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1119,9 +1119,6 @@ ddxGiveUp() DGAShutdown(); #endif - while (xf86NumScreens) - xf86DeleteScreen(xf86NumScreens - 1, 0); - xf86CloseConsole(); xf86CloseLog(); -- cgit v1.2.3 From e59aeac1ff13ea53f44dba1ac7800f37f4532ca1 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 6 Dec 2006 23:44:06 +0200 Subject: xfree86: remove stray debug line --- hw/xfree86/common/xf86Events.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'hw/xfree86/common') diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 5469426f2..05e62f184 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -789,8 +789,6 @@ xf86ReleaseKeys(DeviceIntPtr pDev) xEvent ke; int i = 0, j = 0, nevents = 0; - ErrorF("releasekeys: called on device %s (%d)\n", pDev->name, pDev->id); - if (!pDev || !pDev->key) return; -- cgit v1.2.3