diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-10-14 16:09:20 +1030 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-10-14 16:09:20 +1030 |
commit | b0737bdbd1f6e601eb4984b6f4cb49279190984c (patch) | |
tree | f7a3987aacd7214ecea3c2f558d119e446c9b7ac /src/evdev.c | |
parent | 5f2c8a2dcdf98b39997ee5e7c9a9ace3b640bfa3 (diff) |
Clean up program flow - don't call PreInit for "modules" on DEVICE_INIT.
Call the PreInit functions for MB Emulation, wheel emu, and draglock during
PreInit, not on DEVICE_INIT. This way, we only parse the options once and
don't overwrite with defaults when coming back from a VT switch.
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/evdev.c b/src/evdev.c index f79cdfb..6d05b07 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1000,13 +1000,6 @@ EvdevOn(DeviceIntPtr device) } else { xf86AddEnabledDevice(pInfo); - if ((pEvdev->flags & EVDEV_BUTTON_EVENTS) && - !(pEvdev->flags & EVDEV_INITIALIZED)) - { - EvdevMBEmuPreInit(pInfo); - EvdevWheelEmuPreInit(pInfo); - EvdevDragLockInit(pInfo); - } pEvdev->flags |= EVDEV_INITIALIZED; device->public.on = TRUE; } @@ -1367,6 +1360,10 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags) EvdevCacheCompare(pInfo, FALSE); /* cache device data */ + EvdevMBEmuPreInit(pInfo); + EvdevWheelEmuPreInit(pInfo); + EvdevDragLockInit(pInfo); + return pInfo; } |