summaryrefslogtreecommitdiff
path: root/src/emuMB.c
AgeCommit message (Collapse)Author
2016-06-02Support XINPUT ABI version 23 (threaded input)Keith Packard
Use input_lock/input_unlock calls instead of SIGIO functions Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-06-08Use xf86IDrvMsg in emuMB.c instead of ErrorFPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2011-11-11Replace 0/1 button values with enumsPeter Hutterer
BUTTON_PRESS is much harder to confuse with a button number than a simple 1. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-01-24Remove support for X input ABI < 12.2Chase Douglas
Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-31Disable middle mouse button emulation by default.Peter Hutterer
The AUTO feature was the default, MB emulation was on until a middle mouse button was pressed. MB emulation however results in a delay of the first press, causing minor annoyances to the users and being generally confusing when the behaviour before a button press is different to after a button pres. Disable the feature by default instead. There's not a lot of two-button mice around anymore though and the inability to detect two-button mice makes for non-deterministic detection of when the emulation should be on. Middle button emulation can be enabled with a configuration snippet: Section "InputClass" Identifier "middle button emulation" MatchIsPointer "on" Option "Emulate3Buttons" "on" EndSection Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org>
2010-04-29config: remove AH_TOP autoheader statement.Peter Hutterer
Include it in evdev.h instead. xorg-server.h is required to define the right datatype sizes on 64 bit, hence ensure that evdev.h is the first included in each file. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-25emuMB: default to disabled mouse button emulation for touchscreens.Oliver McFadden
Because touchscreens only use one button (see EvdevProcessKeyEvent()) EvdevMBEmuFilterEvent() never calls EvdevMBEmuEnable(..., FALSE) to disable emulation. This results in touchscreen devices incurring a delay of Emulate3Timeout (typically 50 ms.) Default to MBEMU_DISABLED for touchscreen devices (unless overwritten by Xorg.conf.) Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-14Add EvdevPostButtonEvent API to immediately post a button event (#23269)Peter Hutterer
The wheel emulation code needs this API. When the timer expires, the event must be posted immediately, not enqueued onto the internal event queue. Otherwise, the emulated middle button press is enqueued only and no event is sent until the next physical event (and its EV_SYN) arrives. Since the timer is triggered outside of the SIGIO and SIGIO is blocked during this period anyway, we could also just enqueue the event and flush by simulating an EV_SYN. It's easier this way though. X.Org Bug 23269 <http://bugs.freedesktop.org/show_bug.cgi?id=23269> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
2009-08-13Rename parts of the Post API to a Queue API.Peter Hutterer
Button and key events aren't posted from EvdevPost*Event, they are simply enqueued onto the evdev-internal event queue until the next EV_SYN arrives. Rename those interfaces from EvdevPost* to EvdevQueue* and leave only those that actually post to the server with a matching "*Post*" name. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com>
2009-08-04evdev: Use the EvdevPost...Event() functions in the emulation code.Oliver McFadden
This is similar to commit 1f641d75edba7394201c1c53938215bae696791b. It provides the same functionality of queuing the (in this case emulated) events and waiting until an EV_SYN synchronization event is received before posting them to the server. This preserves the order of events (both real and emulated) and ensures that MotionNotify events will always be posted first. It also unifies the event posting into a few small functions which improves maintainability. From this point on, you should never use the xf86Post...Event() functions in new code, but rather the EvdevPost...Event() versions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-20Don't register middle mouse button emulation handlers for keyboards.Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-02Janitor: make distcheck, .gitignore.Paulo Cesar Pereira de Andrade
Remove non toplevel .gitignore and .cvsignore files. The "make distcheck correction" for $(sdkdir) probably has a better approach using a "*-hook:" target, or possibly making $sdkdir a configure time option that could be set with DISTCHECK_CONFIGURE_FLAGS.
2009-01-13Disable middle mouse button emulation when a middle mouse button event is ↵Michael Chapman
registered Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-10-28emuMB: add EvdevMBEmuOn and call from EvdevOn to register wakeup handlers.Peter Hutterer
This got broken in b0737bdbd1f6e601eb4984b6f4cb49279190984c, when the EmuMBPreInit call was removed from EvdevOn. As a result, VT switching away and back wouldn't restore the wakeup handlers and mouse button presses disappeared.
2008-10-24emulate MB: fix confusing log message.Peter Hutterer
If we're forcing MB emulation behaviour as per config, then at least state whether we're forcing it off or on. Found by Michel Dänzer.
2008-10-23MB emulation timeout is stored as Time, make the property 32-bit too.Peter Hutterer
2008-10-14Tidy up evdev.hPeter Hutterer
This includes shuffling some functions around so we don't need the prototypes in evdev.h.
2008-10-14Register property handler from within the modules, not the main evdev file.Peter Hutterer
2008-10-14Clean up program flow - don't call PreInit for "modules" on DEVICE_INIT.Peter Hutterer
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.
2008-10-11Add checkonly handling to property handlers.Peter Hutterer
If checkonly is TRUE, we can only check if applying the value would succeed. The value is actually applied if checkonly is FALSE.
2008-10-11Stricter value checking for property changes.Peter Hutterer
2008-10-02Remove useless initialization of rc.Peter Hutterer
2008-09-30Add evdev-properties.h file with #defines for all property names.Peter Hutterer
2008-09-26Use new property API (no ConfigureDP, less args to ChangeDP)Peter Hutterer
Return appropriate status codes from property handlers. Make properties non-deletable.
2008-09-04Use HAVE_PROPERTIES define instead of GET_ABI_MAJOR for property compilation.Peter Hutterer
2008-09-04Shut up "unused variable" compiler warnings.Peter Hutterer
Hide properties behind ifdefs, fake use of "val".
2008-08-08Simplify the property handler registration.Peter Hutterer
Instead of having separate handlers for each property, just handle all of them in one handler for emuMB, and one handler for emuWheel.
2008-08-06Adding a function to map button events to button numbers.Chris Salch
Remove code duplication, let the mapping function hand us the actual button event to be passed up to the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2008-07-21Guard property changes against ABI_XINPUT < 3.Peter Hutterer
2008-07-10Add support for device properties, currently MB emulation and timeout.Peter Hutterer
2008-07-03Update COPYING with the correct copyright info.Peter Hutterer
Fix up licence of emuMB.c, was using Red Hat instead of "The authors", but this code wasn't contributed by RH anyway.
2008-06-17Shut up compiler warning "implicit declaration of function 'xf86Msg'"Peter Hutterer
2008-06-11If Emulate3Buttons is specified in the config, don't auto-deactivate it.Peter Hutterer
Default setting is still "on" until middle button is pressed. If the options is however explicitly stated in the config file, it takes the value from the config file, no matter if a middle button is present.
2008-06-11Remove wakeup handlers when device is closed.Peter Hutterer
Less SIGABRTs are less exciting, but sometimes boredom is what we want.
2008-06-10Enable middle-mouse button emulation.Peter Hutterer
Ported from xf86-input-mouse, with a few cleanups.