Age | Commit message (Collapse) | Author |
|
Sometimes it may be desirable to remap physical middle button
to something else and use emulation instead. The emulation is
however hardcoded to emulate physical button 2, so the emulated
button gets remapped together with the physical one. This patch
adds the Emulate3Button configuration option to allow for user
selection of the emulated button number and a configuration
like this:
Section "InputClass"
Identifier "Middle button emulation config"
MatchProduct ".... some device ..."
MatchDriver "evdev"
Option "Emulate3Buttons" "on"
Option "Emulate3Button" "9"
EndSection
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
The evdev driver wasn't using the select mask arguments, so this
change just involves adjusting the argument lists.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
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>
|
|
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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.
|
|
registered
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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.
|
|
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.
|
|
|
|
This includes shuffling some functions around so we don't need the prototypes
in evdev.h.
|
|
|
|
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.
|
|
If checkonly is TRUE, we can only check if applying the value would succeed.
The value is actually applied if checkonly is FALSE.
|
|
|
|
|
|
|
|
Return appropriate status codes from property handlers.
Make properties non-deletable.
|
|
|
|
Hide properties behind ifdefs, fake use of "val".
|
|
Instead of having separate handlers for each property, just handle all of them
in one handler for emuMB, and one handler for emuWheel.
|
|
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>
|
|
|
|
|
|
Fix up licence of emuMB.c, was using Red Hat instead of "The authors", but
this code wasn't contributed by RH anyway.
|
|
|
|
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.
|
|
Less SIGABRTs are less exciting, but sometimes boredom is what we want.
|
|
Ported from xf86-input-mouse, with a few cleanups.
|