aboutsummaryrefslogtreecommitdiff
path: root/src/emuWheel.c
Commit message (Collapse)AuthorAge
* Split rel and abs axis mapping into two separate arraysPeter Hutterer2013-01-23
| | | | | | | This will enable a device to have relative scrolling axes in addition to absolute axes (required by the QEMU tablet). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix some obvious constness-related compile warnings.Marcin Slusarz2012-05-21
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove unused misc_label and valPeter Hutterer2011-06-15
| | | | | | | | | | | | | | | evdev.c: In function 'EvdevInitAxesLabels': evdev.c:2192:11: warning: variable 'misc_label' set but not used [-Wunused-but-set-variable] obsolete with 880ad1e19afd83ac115948b67d4049e16cb12df0 emuWheel.c: In function 'EvdevWheelEmuPreInit': emuWheel.c:252:10: warning: variable 'val' set but not used [-Wunused-but-set-variable] obsolete with b0737bdbd1f6e601eb4984b6f4cb49279190984c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
* Replace xf86Msg() with xf86IDrvMsg().Peter Hutterer2011-01-31
| | | | | | | | | The latter provides a standardised message format in the form of driver name: device name: message making it easier to grep for driver messages in the log. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for masked valuatorsChase Douglas2011-01-25
| | | | | | | | With the X server now supporting masked valuators for XI2, enable support in X evdev. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> 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>
* Remove libc wrappers for malloc, calloc and free.Peter Hutterer2010-05-28
| | | | | | | | | Evdev is Linux-only, and we've had the above calls for quite a while now. Plus, now that the server has removed them they generate _a lot_ of warnings otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net>
* 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>
* evdev: leaked_storage: free memory allocated from the xf86Option code.Oliver McFadden2010-04-20
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* allow wheel emulation to work with absolute-position devicesDima Kogan2009-12-08
| | | | | Signed-off-by: Dima Kogan <dkogan@cds.caltech.edu> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* emuWheel: fix signed/unsigned screwupPeter Hutterer2009-09-23
| | | | | | | This patch fixes wheel emulation on buttons other than 0. Reported-by: Andy Neitzke Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Allow 0 as wheel emulation button for unconditional scrolling (#20529)Dima Kogan2009-08-18
| | | | | | | | | If wheel emulation is on and the emulation button is 0, then any x/y motion of the device is converted into wheel events. The devices becomes a scrolling-only device. Signed-off-by: Dima Kogan <dkogan@cds.caltech.edu> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Restrict wheel emulation to a single axis at a time.Peter Hutterer2009-08-18
| | | | | | | | | | | | | | | | Wheel emulation works for both horizontal and vertical axes. Thus, if a device doesn't move in perfect straight line, scroll events build up on the respective other axis. In some clients, scroll wheel events have specific meanings other than scrolling (e.g. mplayer). In these clients, erroneous scrolling events come at a high cost. Thus, if a scroll wheel event is generated for one axis, reset the inertia of the other axis to 0, avoiding the buildup of these erroneous scrolling events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* 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>
* Coverity Prevent: NO_EFFECT in EvdevWheelEmuSetProperty:Oliver McFadden2009-07-17
| | | | | | | Event unsigned_compare: Comparing unsigned less than zero is never true. "pEvdev->emulateWheel.timeout < 0UL" 342 if (pEvdev->emulateWheel.timeout < 0) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Rename pEvdev->buttons to pEvdev->num_buttons for clarity.Peter Hutterer2009-05-21
| | | | 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.
* Protect against zero-sized property values. #19882Peter Hutterer2009-02-02
| | | | | | X.Org Bug 19882 <http://bugs.freedesktop.org/show_bug.cgi?id=19882> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* 8-bit properties should use 8-bit storage types...Peter Hutterer2008-10-14
|
* 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
|
* Cleanup: "valid_vals" should be "vals" now.Peter Hutterer2008-09-30
|
* 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".
* Wheel emulation: initial values must be char.Peter Hutterer2008-08-25
| | | | parsing int* to char* in XIChangeDeviceProperty means we lose values.
* Init all emulateWheel values, even if EmulateWheel is disabled.Peter Hutterer2008-08-22
| | | | | | Even if we don't want EmulateWheel, we can at least init everything to usable values. This way we only need to toggle "enabled", rather than initialising the whole lot before usage.
* Add wheel timeout property supportDan Nicholson2008-08-22
| | | | | | | Copied from the wheel inertia property support. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
* Add timeout support for mouse wheel emulationDan Nicholson2008-08-22
| | | | | | | Support the EmulateWheelTimeout option as the mouse driver does. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
* 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.
* Add EVDEV_MAXBUTTONS instead of checking against 32.Peter Hutterer2008-08-08
| | | | Numbers are so lame, defines are all the rage now I've heard.
* Expose wheel emulation through device properties.Peter Hutterer2008-08-08
| | | | Don't enable wheel emulation with 0 inertia - bad things happen.
* Adding mouse wheel emulation code.Chris Salch2008-08-07
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>