[PATCH] Enable middle button emulation at DEVICE_ON instead of DEVICE_INIT.

Keith Packard keithp at keithp.com
Fri Jun 20 20:59:09 PDT 2008


From 45667a0bdc109076d2518c67066b301f1973daec Mon Sep 17 00:00:00 2001

This ensures that the middle button emulation is re-enabled after VT switch,
otherwise the block handler that deals with the timeouts would not get
re-registered.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 src/evdev.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 65b7185..fa0545f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -835,6 +835,8 @@ EvdevProc(DeviceIntPtr device, int what)
             xf86Msg(X_WARNING, "%s: Grab failed (%s)\n", pInfo->name,
                     strerror(errno));
         xf86AddEnabledDevice(pInfo);
+	if (pEvdev->flags & EVDEV_BUTTON_EVENTS)
+	    EvdevMBEmuPreInit(pInfo);
 	device->public.on = TRUE;
 	break;
 	    
@@ -941,7 +943,6 @@ EvdevProbe(InputInfoPtr pInfo)
 
     if (TestBit(BTN_LEFT, key_bitmask)) {
         xf86Msg(X_INFO, "%s: Found mouse buttons\n", pInfo->name);
-	EvdevMBEmuPreInit(pInfo);
 	pEvdev->flags |= EVDEV_BUTTON_EVENTS;
 	has_buttons = TRUE;
     }
-- 
1.5.5.4


-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20080620/0b9ba5d3/attachment.pgp>


More information about the xorg mailing list