aboutsummaryrefslogtreecommitdiff
path: root/src/emuMB.c
Commit message (Collapse)AuthorAge
* Use xf86IDrvMsg in emuMB.c instead of ErrorFPeter Hutterer2012-06-08
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
* Replace 0/1 button values with enumsPeter Hutterer2011-11-11
| | | | | | 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>
* Remove support for X input ABI < 12.2Chase Douglas2011-01-24
| | | | | Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Disable middle mouse button emulation by default.Peter Hutterer2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | 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>
* config: remove AH_TOP autoheader statement.Peter Hutterer2010-04-29
| | | | | | | | | 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>
* emuMB: default to disabled mouse button emulation for touchscreens.Oliver McFadden2010-02-25
| | | | | | | | | | | | | | 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>
* Add EvdevPostButtonEvent API to immediately post a button event (#23269)Peter Hutterer2009-08-14
| | | | | | | | | | | | | | | | 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>
* Rename parts of the Post API to a Queue API.Peter Hutterer2009-08-13
| | | | | | | | | | 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>
* evdev: Use the EvdevPost...Event() functions in the emulation code.Oliver McFadden2009-08-04
| | | | | | | | | | | | | | | | | | 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>
* Don't register middle mouse button emulation handlers for keyboards.Peter Hutterer2009-07-20
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Janitor: make distcheck, .gitignore.Paulo Cesar Pereira de Andrade2009-02-02
| | | | | | | 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.
* Disable middle mouse button emulation when a middle mouse button event is ↵Michael Chapman2009-01-13
| | | | | | registered Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* emuMB: add EvdevMBEmuOn and call from EvdevOn to register wakeup handlers.Peter Hutterer2008-10-28
| | | | | | | 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.
* emulate MB: fix confusing log message.Peter Hutterer2008-10-24
| | | | | | | 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.
* MB emulation timeout is stored as Time, make the property 32-bit too.Peter Hutterer2008-10-23
|
* Tidy up evdev.hPeter Hutterer2008-10-14
| | | | | This includes shuffling some functions around so we don't need the prototypes in evdev.h.
* Register property handler from within the modules, not the main evdev file.Peter Hutterer2008-10-14
|
* Clean up program flow - don't call PreInit for "modules" on DEVICE_INIT.Peter Hutterer2008-10-14
| | | | | | 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.
* Add checkonly handling to property handlers.Peter Hutterer2008-10-11
| | | | | If checkonly is TRUE, we can only check if applying the value would succeed. The value is actually applied if checkonly is FALSE.
* Stricter value checking for property changes.Peter Hutterer2008-10-11
|
* Remove useless initialization of rc.Peter Hutterer2008-10-02
|
* Add evdev-properties.h file with #defines for all property names.Peter Hutterer2008-09-30
|
* Use new property API (no ConfigureDP, less args to ChangeDP)Peter Hutterer2008-09-26
| | | | | Return appropriate status codes from property handlers. Make properties non-deletable.
* Use HAVE_PROPERTIES define instead of GET_ABI_MAJOR for property compilation.Peter Hutterer2008-09-04
|
* Shut up "unused variable" compiler warnings.Peter Hutterer2008-09-04
| | | | Hide properties behind ifdefs, fake use of "val".
* Simplify the property handler registration.Peter Hutterer2008-08-08
| | | | | Instead of having separate handlers for each property, just handle all of them in one handler for emuMB, and one handler for emuWheel.
* Adding a function to map button events to button numbers.Chris Salch2008-08-06
| | | | | | | 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>
* Guard property changes against ABI_XINPUT < 3.Peter Hutterer2008-07-21
|
* Add support for device properties, currently MB emulation and timeout.Peter Hutterer2008-07-10
|
* Update COPYING with the correct copyright info.Peter Hutterer2008-07-03
| | | | | Fix up licence of emuMB.c, was using Red Hat instead of "The authors", but this code wasn't contributed by RH anyway.
* Shut up compiler warning "implicit declaration of function 'xf86Msg'"Peter Hutterer2008-06-17
|
* If Emulate3Buttons is specified in the config, don't auto-deactivate it.Peter Hutterer2008-06-11
| | | | | | 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.
* Remove wakeup handlers when device is closed.Peter Hutterer2008-06-11
| | | | Less SIGABRTs are less exciting, but sometimes boredom is what we want.
* Enable middle-mouse button emulation.Peter Hutterer2008-06-10
Ported from xf86-input-mouse, with a few cleanups.