diff -Naur xserver-xorg-input-evdev.orig/src/emuMB.c xserver-xorg-input-evdev/src/emuMB.c --- xserver-xorg-input-evdev.orig/src/emuMB.c 2008-11-03 00:31:58.000000000 +0100 +++ xserver-xorg-input-evdev/src/emuMB.c 2008-11-03 00:30:57.000000000 +0100 @@ -320,18 +320,14 @@ pEvdev->emulateMB.timeout = xf86SetIntOption(pInfo->options, "Emulate3Timeout", 50); +} + +void +EvdevMBEmuOn(InputInfoPtr pInfo) +{ RegisterBlockAndWakeupHandlers (EvdevMBEmuBlockHandler, EvdevMBEmuWakeupHandler, (pointer)pInfo); - -#ifdef HAVE_PROPERTIES - XIChangeDeviceProperty(pInfo->dev, prop_mbemu, XA_INTEGER, 8, - PropModeReplace, 1, &pEvdev->emulateMB.enabled, - TRUE); - XIChangeDeviceProperty(pInfo->dev, prop_mbtimeout, XA_INTEGER, 16, - PropModeReplace, 1, &pEvdev->emulateMB.timeout, - TRUE); -#endif } void diff -Naur xserver-xorg-input-evdev.orig/src/emuWheel.c xserver-xorg-input-evdev/src/emuWheel.c --- xserver-xorg-input-evdev.orig/src/emuWheel.c 2008-11-03 00:31:58.000000000 +0100 +++ xserver-xorg-input-evdev/src/emuWheel.c 2008-11-03 00:30:57.000000000 +0100 @@ -316,27 +316,6 @@ "EmulateWheelTimeout: %d\n", pInfo->name, pEvdev->emulateWheel.button, inertia, timeout); -#ifdef HAVE_PROPERTIES - XIChangeDeviceProperty(pInfo->dev, prop_wheel_emu, XA_INTEGER, 8, - PropModeReplace, 1, &pEvdev->emulateWheel.enabled, TRUE); - XIChangeDeviceProperty(pInfo->dev, prop_wheel_button, XA_INTEGER, 8, - PropModeReplace, 1, &pEvdev->emulateWheel.button, TRUE); - XIChangeDeviceProperty(pInfo->dev, prop_wheel_inertia, XA_INTEGER, 8, - PropModeReplace, 1, &pEvdev->emulateWheel.inertia, TRUE); - XIChangeDeviceProperty(pInfo->dev, prop_wheel_timeout, XA_INTEGER, 16, - PropModeReplace, 1, &pEvdev->emulateWheel.timeout, TRUE); - - val[0] = pEvdev->emulateWheel.X.up_button; - val[1] = pEvdev->emulateWheel.X.down_button; - XIChangeDeviceProperty(pInfo->dev, prop_wheel_xmap, XA_INTEGER, 8, - PropModeReplace, 2, val, TRUE); - - val[0] = pEvdev->emulateWheel.Y.up_button; - val[1] = pEvdev->emulateWheel.Y.down_button; - XIChangeDeviceProperty(pInfo->dev, prop_wheel_ymap, XA_INTEGER, 8, - PropModeReplace, 2, val, TRUE); - -#endif } #ifdef HAVE_PROPERTIES diff -Naur xserver-xorg-input-evdev.orig/src/evdev.c xserver-xorg-input-evdev/src/evdev.c --- xserver-xorg-input-evdev.orig/src/evdev.c 2008-11-03 00:31:58.000000000 +0100 +++ xserver-xorg-input-evdev/src/evdev.c 2008-11-03 00:30:57.000000000 +0100 @@ -1033,13 +1033,7 @@ } else { xf86AddEnabledDevice(pInfo); - if ((pEvdev->flags & EVDEV_BUTTON_EVENTS) && - !(pEvdev->flags & EVDEV_INITIALIZED)) - { - EvdevMBEmuPreInit(pInfo); - EvdevWheelEmuPreInit(pInfo); - EvdevDragLockInit(pInfo); - } + EvdevMBEmuOn(pInfo); pEvdev->flags |= EVDEV_INITIALIZED; device->public.on = TRUE; } @@ -1401,6 +1395,10 @@ EvdevCacheCompare(pInfo, FALSE); /* cache device data */ + EvdevMBEmuPreInit(pInfo); + EvdevWheelEmuPreInit(pInfo); + EvdevDragLockInit(pInfo); + return pInfo; } diff -Naur xserver-xorg-input-evdev.orig/src/evdev.h xserver-xorg-input-evdev/src/evdev.h --- xserver-xorg-input-evdev.orig/src/evdev.h 2008-11-03 00:31:58.000000000 +0100 +++ xserver-xorg-input-evdev/src/evdev.h 2008-11-03 00:30:57.000000000 +0100 @@ -124,6 +124,7 @@ void EvdevMBEmuWakeupHandler(pointer, int, pointer); void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer); void EvdevMBEmuPreInit(InputInfoPtr); +void EvdevMBEmuOn(InputInfoPtr); void EvdevMBEmuFinalize(InputInfoPtr); void EvdevMBEmuEnable(InputInfoPtr, BOOL);