summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-03Remove incorrect & in swap_uint32Matt Turner1-1/+1
Caused by commit 893e86a4, and hidden by the (char *) cast. Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Tested-by: Aaron Plattner <aplattner@nvidia.com>
2011-10-03Add #include "inpututils.h" to xkbAccessX.c for init_device_eventAlan Coopersmith1-0/+1
Fixes Sun compiler warning: "xkbAccessX.c", line 128: warning: implicit function declaration: init_device_event Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-10-01sdksyms.sh may not be executable.Matthieu Herrb1-1/+1
Use $(SHELL) to run it. Someone may want to build out of a source tree in a filesystem with the noexec mount flag set. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-30Add a 'wscons' autoconf mechanism to configure input devices on BSD.Matthieu Herrb8-4/+307
This does not really handle hotplug (it's handled inside the kernel, by the 'mux' devices), but uses the wscons console driver configuration to figure out the keyboard layout and the list of pointing devices found by the kernel. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-30Input: Fix frac calculation on [Raw]DeviceEvent conversionMax Schwarz1-4/+6
(1UL << 32) evaluates to 0 (at least here), so do the fraction calculation in two steps as in libXi. Fractions on xXIRawEvent were not multiplied at all, which also gave 0 as result. Signed-off-by: Max Schwarz <Max@x-quadraht.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-30Merge branch 'smooth-scrolling' into nextPeter Hutterer24-478/+951
2011-09-30Input: Add smooth-scrolling support to GetPointerEventsPeter Hutterer10-11/+506
For scroll wheel support, we used to send buttons 4/5 and 6/7 for horizontal/vertical positive/negative scroll events. For touchpads, we really want more fine-grained scroll values. GetPointerEvents now accepts both old-school scroll button presses, and new-style scroll axis events, while emitting both types of events to support both old and new clients. This works with the new XIScrollClass to mark axes as scrolling axes. Drivers mark any valuators that send scroll events with SetScrollValuator. (Currently missing: the XIDeviceChangeEvent being sent when a driver changes a scroll axis at run-time. This can be added later.) Note: the SCROLL_TYPE enums are intentionally different values to the XI2 proto values to avoid copy/overlapping range bugs. Co-authored-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Remove unused vtSysreqAlexandr Shadchin6-39/+0
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: ioctl KDENABIO/KDDISABIO do not matter for OpenBSDAlexandr Shadchin1-3/+3
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: OpenBSD and NetBSD not need extra headers in PCVT_SUPPORTAlexandr Shadchin1-9/+3
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: Some clean upAlexandr Shadchin2-16/+8
OpenBSD and NetBSD does not support syscons Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: Remove dead codeAlexandr Shadchin1-23/+0
Since OsInit closes stdin before the xfree86 DDX opens the console, fstat on stdin will always fail, so it's safe to delete code that attempts it. Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: Variable devConsoleFd need only if defined PCCONS_SUPPORTAlexandr Shadchin1-0/+5
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: Replacement screenFd on consoleFd because they are equivalentAlexandr Shadchin8-23/+9
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29bsd: Remove unused macros KBD_FDAlexandr Shadchin1-4/+0
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2011-09-29Merge branch 'raw-events' into nextPeter Hutterer3-18/+78
Conflicts: configure.ac dix/events.c
2011-09-29dix: use 'rc' for return code in DeliverRawEventPeter Hutterer1-4/+4
Reported-by: Walter Harms <wharms@bfs.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29input: deliver raw events unconditionally for XI 2.1 clients.Peter Hutterer1-16/+77
Deliver raw events regardless whether there is a grab on or not for clients supporting 2.1 or later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Support (and require) XI 2.1Peter Hutterer2-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29dix: rename ProcessRawEvents to dix/events.c:DeliverRawEventPeter Hutterer3-30/+35
No functional changes, prep work for future changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Xi: use temporary variable for filter.Peter Hutterer1-1/+4
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29dix: split DeliverEventToWindowMask up a bit more.Peter Hutterer1-19/+33
Move out the actual event delivery, it needs to be used from elsewhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29dix: rename DeliverEventsToClients to DeliverEventsToWindowMaskPeter Hutterer1-5/+5
To avoid confusion with a future patch and it better describes what this does anyway - delivering events to all clients that have the event mask on the window. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29dix: split client list retrieval out of DeliverEventToClientsPeter Hutterer1-14/+36
No functional change, but "other" was renamed to "clients". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29xkb: Fix case checks for Latin 4.Cyril Brulebois1-1/+2
That one was missing _XkbKSLower: XK_kra: U+0138 LATIN SMALL LETTER KRA Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-09-29xkb: Fix case checks for Latin 2.Cyril Brulebois1-1/+1
Those ones were getting _XkbKSLower for no reasons: XK_ogonek: U+02DB OGONEK XK_doubleacute: U+02DD DOUBLE ACUTE ACCENT Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-09-29xkb: Fix case checks for Latin 1.Cyril Brulebois1-1/+1
That one was missing _XkbKSLower: XK_ssharp: U+00DF LATIN SMALL LETTER SHARP S That one was getting _XkbKSLower for no reasons: XK_division: U+00F7 DIVISION SIGN For reference, XK_multiply was already excluded from the _XkbKSUpper check, it's no big surprise XK_division has to be excluded from the _XkbKSLower check. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org>
2011-09-29input: allow for max < min for relative axes on InitValuatorAxisStructPeter Hutterer1-1/+1
Relative axes are initialized with 0, -1 but so far this never had any effect as all users of this function (for relative axes) just set it to the defaults anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29input: switch InitValuatorAxisStruct to return BoolPeter Hutterer4-9/+11
Return errors instead of silently ignoring them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Input: Add POINTER_EMULATED flag to GetPointerEventsDaniel Stone3-1/+24
POINTER_EMULATED merely sets XIPointerEmulated in the generated DeviceEvent. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Add vertical and horizontal scroll axesDaniel Stone2-0/+7
To be used for smooth scrolling with future driver APIs, replacing Rel Vert Wheel and Rel Horiz Wheel axes, which have not been used in any open driver to date. Combined with double-granularity ValuatorMasks, these axes allow for fine-grained scroll data to be sent to clients. Future commits allow drivers to post these scroll axes to QueuePointerEvents/GetPointerEvents, which take care of emulating legacy scroll button events. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Input: Split GetPointerEvents body into a helper functionDaniel Stone1-28/+48
For smooth-scrolling support, we want GetPointerEvents to generate multiple events, so split the body of the function out into a helper function in order to call it multiple times. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Set last valuators in GetPointerEvents onlyDaniel Stone1-7/+7
Previously, various pieces of code, including acceleration, used to drop the values into DeviceIntRec::last.valuators. Remove all this and only do it in GetPointerEvents after all transformation, acceleration and clipping, so we're guaranteed to always have the correct values. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Convert DeviceIntRec::last to use doublesDaniel Stone3-42/+30
Change the last real user of a split integer/fractional co-ordinate system, DeviceIntRec's last->{valuators,remainder} to just have one set of doubles. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Make DeviceEvent use doubles internallyDaniel Stone5-15/+9
Change the DeviceEvent InternalEvent to use doubles for its valuators, instead of data and data_frac. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Make RawDeviceEvent use doubles internallyDaniel Stone4-31/+22
Change RawDeviceEvent to use doubles for valuators internally, rather than data(_raw) and data(_raw)_frac. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Modify mask in-place in positionSpriteDaniel Stone1-37/+30
Instead of taking pointers to x and y values to modify in positionSprite, just modify the mask (as well as dev->last) in place. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Convert positionSprite and GetPointerEvents to doubleDaniel Stone1-92/+56
Use doubles internally in both of these functions, eliminating most of the remaining int co-ordinate usage. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Don't call positionSprite for non-pointer devicesDaniel Stone1-21/+12
If the device doesn't have any valuators, or if it has less than two of them, don't bother calling positionSprite. Users with one-dimensional pointing devices may be upset. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Convert rescaleValuatorAxis to doubleDaniel Stone1-50/+61
Instead of passing fractional pointers around everywhere, just pass doubles instead. Much easier. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Remove x and y from moveAbsolute/moveRelativeDaniel Stone1-22/+20
Both these functions modify the mask and pDev->last.{valuators,remainder} in-place now, so there's no need to pass in pointers to local x and y values. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Convert acceleration code to using ValuatorMaskDaniel Stone2-60/+34
Instead of passing a set of int* to the acceleration code, pass it a mask instead, which avoids an unfortunate loss of precision. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de>
2011-09-29Input: Widen pointer acceleration types to doubleDaniel Stone3-135/+129
This widens almost all of the float-using code in ptrveloc.[ch] to doubles, other than values coming from properties which are specified to be floats by the property API. Bumps input API to v14 as this changes the AccelScheme signature, as used by xf86-input-synaptics. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Input: Use trunc instead of lrintf in acceleration codeDaniel Stone1-7/+2
For compatibility with all the rest of the input code. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Simon Thum <simon.thum@gmx.de>
2011-09-29Input: Set fractional member in set_raw_valuatorsDaniel Stone1-6/+14
RawDeviceEvents have space for fractional valuator members, so might as well start using them. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Convert transformAbsolute to work on doublesDaniel Stone1-10/+15
Change transformAbsolute to use doubles internally. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Convert clipAxis, moveAbsolute and moveRelative to doubleDaniel Stone1-23/+25
Change all these three to use doubles internally, though the outputs of moveAbsolute and moveRelative are still truncated to int. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2011-09-29Input: Prepare moveRelative for conversion to doubleDaniel Stone1-29/+17
Shuffle some code around in moveRelative to make the conversion to double easier later. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Prepare moveAbsolute for conversion to doubleDaniel Stone1-22/+12
Shuffle some code around to make moving to double easier later. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-09-29Input: Store clipped absolute axes in the maskDaniel Stone1-0/+1
Change moveAbsolute to be more symmetric with moveRelative by storing a clipped axis value back in the mask, rather than just in dev->last.valuators. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>