Kristian Høgsberg
cb3c6ad5c6
evdev: Silence warning
2013-11-10 17:51:26 +01:00
Kristian Høgsberg
fb0da2d026
compositor: The compositor is now jiust a regular global object
...
We have to provide our own bind callback and add a wlsc_compositor pointer
to wlsc_input_device, but on the whole it's nice cleanup.
2013-11-10 17:51:26 +01:00
Kristian Høgsberg
32a940e01a
Simplify evdev_flush_motion() a tiny bit
2013-11-10 17:51:26 +01:00
Tiago Vignatti
2a3c15ab50
evdev: fetch absolute coordinates inside flush_motion only
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Tiago Vignatti
f93e815e71
evdev: remove useless field from device structure
...
We'll want to enhance later the driver regarding the tool being used, but for
now just remove unused bits.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Tiago Vignatti
70ca695e9a
evdev: reset accumulator inside evdev_flush_motion
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Tiago Vignatti
2b56d6131e
evdev: use a separate structure to denote accumulated motion events
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Tiago Vignatti
1e0dfd820c
evdev: use a separate struct for abs information
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Kristian Høgsberg
0090c3b29e
evdev: Reset accumulate values when we flush motion events
...
Otherwise we end up reporting all motion events twice.
2013-11-10 17:51:26 +01:00
Tiago Vignatti
c6fc7c3d21
evdev: fix order of events being sent to the compositor
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Tiago Vignatti
11bf9d088c
evdev: remove signed value checks
...
Very likely that 2.4 kernels won't be used with Wayland compositor so the
check for signal value is pretty much useless.
It's okay to change e->value inside evdev_process_absolute_motion_touchpad
given it's not used later on, and I also rather not touch this snip because it
will be changed when multi-touch support arrives.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:26 +01:00
Tiago Vignatti
f9abe44b98
evdev: Simplify error path for device creation
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Tiago Vignatti
3b6274e10c
evdev: Delete unused fields from evdev_input_device
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Tiago Vignatti
6ee755d0db
evdev: Add hotplug support
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Kristian Høgsberg
771c31005d
evdev: Associate touchscreen devices with output up front
...
This isn't going to change over time, so just tracking it in the
evdev device is a little easier. Also, we need to adjust for the
output position when transforming the device events to screen space.
2013-11-10 17:51:25 +01:00
Tiago Vignatti
728a38301f
evdev: treat BTN_TOUCH as BTN_LEFT
...
idea stolen from xorg evdev.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Tiago Vignatti
b5b8c0e807
evdev: use last output from compositor to get the screen geometries
...
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Tiago Vignatti
76dc338535
evdev: organize the code for processing events
...
Nothing was touched, just code moved around.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Tiago Vignatti
99476b1a69
evdev: opt out accelerometer type of devices
...
We may want to adjust the protocol later for clients that care for
these devices only, generating a special event.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Tiago Vignatti
8355f0670a
evdev: use a separate function for configuring devices
...
No semantical changes.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-11-10 17:51:25 +01:00
Matt Peterson
0ced95682d
Relative movement with a touchpad and other misc fixes for events
2013-11-10 17:51:25 +01:00
Kristian Høgsberg
bdf74308e3
evdev: Only add event devices
2013-11-10 17:51:25 +01:00
Kristian Høgsberg
1ba7295e44
compositor: Use systemd seats for input devices as well
2013-11-10 17:51:25 +01:00
Kristian Høgsberg
0e0776fb62
Update return types of event handler functions
...
Missed this in previous commit.
2013-11-10 17:51:25 +01:00
Kristian Høgsberg
1a75173a73
Some kind of support for touchscreen
2013-11-10 17:51:24 +01:00
Kristian Høgsberg
3b3c001381
Split out evdev handling to its own file
2013-11-10 17:51:24 +01:00