platform/upstream/libinput.git
10 years agoevdev: use a separate function for adding devices
Tiago Vignatti [Sun, 18 Dec 2011 14:47:15 +0000 (16:47 +0200)]
evdev: use a separate function for adding devices

Adds new function evdev_add_devices for adding udev devices. No
functional changes.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: run flush_motion only when needed
Tiago Vignatti [Thu, 8 Dec 2011 11:20:46 +0000 (13:20 +0200)]
evdev: run flush_motion only when needed

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: send old valuator inside event frame when the other is missing
Tiago Vignatti [Thu, 8 Dec 2011 10:18:16 +0000 (12:18 +0200)]
evdev: send old valuator inside event frame when the other is missing

when a motion is being performed on ts device, only one axis can be sent
through the evdev bytestream whereas the other could be omitted. For instance:

   -------------- SYN_REPORT ------------
   type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 22208
   type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 631
   type 3 (EV_ABS), code 0 (ABS_X), value 22208
   -------------- SYN_REPORT ------------

on such case we'd have to send the compositor the old value of Y. Commit
f547bd36 introduced this bug cause it was sending zeroed coordinate and not
the old one.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: Silence warning
Kristian Høgsberg [Fri, 2 Dec 2011 11:39:02 +0000 (06:39 -0500)]
evdev: Silence warning

10 years agocompositor: The compositor is now jiust a regular global object
Kristian Høgsberg [Wed, 23 Nov 2011 15:39:34 +0000 (10:39 -0500)]
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.

10 years agoSimplify evdev_flush_motion() a tiny bit
Kristian Høgsberg [Wed, 23 Nov 2011 00:24:25 +0000 (19:24 -0500)]
Simplify evdev_flush_motion() a tiny bit

10 years agoevdev: fetch absolute coordinates inside flush_motion only
Tiago Vignatti [Tue, 22 Nov 2011 10:05:22 +0000 (12:05 +0200)]
evdev: fetch absolute coordinates inside flush_motion only

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: remove useless field from device structure
Tiago Vignatti [Mon, 21 Nov 2011 16:29:40 +0000 (18:29 +0200)]
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>
10 years agoevdev: reset accumulator inside evdev_flush_motion
Tiago Vignatti [Mon, 21 Nov 2011 15:59:31 +0000 (17:59 +0200)]
evdev: reset accumulator inside evdev_flush_motion

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: use a separate structure to denote accumulated motion events
Tiago Vignatti [Mon, 21 Nov 2011 15:40:30 +0000 (17:40 +0200)]
evdev: use a separate structure to denote accumulated motion events

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: use a separate struct for abs information
Tiago Vignatti [Mon, 21 Nov 2011 14:39:55 +0000 (16:39 +0200)]
evdev: use a separate struct for abs information

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: Reset accumulate values when we flush motion events
Kristian Høgsberg [Fri, 18 Nov 2011 15:42:34 +0000 (10:42 -0500)]
evdev: Reset accumulate values when we flush motion events

Otherwise we end up reporting all motion events twice.

10 years agoevdev: fix order of events being sent to the compositor
Tiago Vignatti [Fri, 18 Nov 2011 12:56:58 +0000 (14:56 +0200)]
evdev: fix order of events being sent to the compositor

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: remove signed value checks
Tiago Vignatti [Thu, 10 Nov 2011 12:47:30 +0000 (14:47 +0200)]
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>
10 years agoevdev: Simplify error path for device creation
Tiago Vignatti [Fri, 28 Oct 2011 17:15:25 +0000 (13:15 -0400)]
evdev: Simplify error path for device creation

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: Delete unused fields from evdev_input_device
Tiago Vignatti [Fri, 28 Oct 2011 17:09:42 +0000 (13:09 -0400)]
evdev: Delete unused fields from evdev_input_device

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: Add hotplug support
Tiago Vignatti [Fri, 28 Oct 2011 17:05:06 +0000 (13:05 -0400)]
evdev: Add hotplug support

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: Associate touchscreen devices with output up front
Kristian Høgsberg [Thu, 1 Sep 2011 17:25:50 +0000 (13:25 -0400)]
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.

10 years agoevdev: treat BTN_TOUCH as BTN_LEFT
Tiago Vignatti [Thu, 1 Sep 2011 16:00:05 +0000 (19:00 +0300)]
evdev: treat BTN_TOUCH as BTN_LEFT

idea stolen from xorg evdev.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: use last output from compositor to get the screen geometries
Tiago Vignatti [Thu, 1 Sep 2011 16:00:04 +0000 (19:00 +0300)]
evdev: use last output from compositor to get the screen geometries

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: organize the code for processing events
Tiago Vignatti [Thu, 1 Sep 2011 16:00:03 +0000 (19:00 +0300)]
evdev: organize the code for processing events

Nothing was touched, just code moved around.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoevdev: opt out accelerometer type of devices
Tiago Vignatti [Fri, 19 Aug 2011 14:07:40 +0000 (17:07 +0300)]
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>
10 years agoevdev: use a separate function for configuring devices
Tiago Vignatti [Fri, 19 Aug 2011 12:06:20 +0000 (15:06 +0300)]
evdev: use a separate function for configuring devices

No semantical changes.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
10 years agoRelative movement with a touchpad and other misc fixes for events
Matt Peterson [Mon, 1 Aug 2011 19:46:29 +0000 (13:46 -0600)]
Relative movement with a touchpad and other misc fixes for events

10 years agoevdev: Only add event devices
Kristian Høgsberg [Thu, 21 Jul 2011 13:46:26 +0000 (06:46 -0700)]
evdev: Only add event devices

10 years agocompositor: Use systemd seats for input devices as well
Kristian Høgsberg [Tue, 19 Jul 2011 23:10:11 +0000 (16:10 -0700)]
compositor: Use systemd seats for input devices as well

10 years agoUpdate return types of event handler functions
Kristian Høgsberg [Fri, 22 Apr 2011 16:27:57 +0000 (12:27 -0400)]
Update return types of event handler functions

Missed this in previous commit.

10 years agoSome kind of support for touchscreen
Kristian Høgsberg [Fri, 14 Jan 2011 19:49:46 +0000 (14:49 -0500)]
Some kind of support for touchscreen

10 years agoSplit out evdev handling to its own file
Kristian Høgsberg [Fri, 14 Jan 2011 19:45:42 +0000 (14:45 -0500)]
Split out evdev handling to its own file

14 years agoSplit native drm part of compositor out
Kristian Høgsberg [Fri, 11 Jun 2010 16:56:24 +0000 (12:56 -0400)]
Split native drm part of compositor out

14 years agoRename wayland-system-compositor back to just compositor
Kristian Høgsberg [Sat, 5 Jun 2010 01:52:02 +0000 (21:52 -0400)]
Rename wayland-system-compositor back to just compositor

15 years agoRename egl-compositor to wayland-system-compositor.
Kristian Høgsberg [Fri, 19 Dec 2008 18:47:53 +0000 (13:47 -0500)]
Rename egl-compositor to wayland-system-compositor.

The wayland-system-compositor is the top-level compositor.  X sessions
or nested Wayland sessions will run as clients of the system compositor.
The system compositor is licensed under the GPL.

15 years agoRewrite input event delivery path.
Kristian Høgsberg [Fri, 12 Dec 2008 04:18:45 +0000 (23:18 -0500)]
Rewrite input event delivery path.

Instead of having the input driver push the events into the core server,
only to have the server call back out to the compositor hooks, the driver now
just calls the compositor directly.  The input drivers are always dependent on
the type of compositor anyway so there was no point in passing the events
through the server.  Now the server is only involved when it's time to actually
send the events to the clients.

15 years agoFix signature for pointer motion event.
Kristian Høgsberg [Wed, 10 Dec 2008 22:31:44 +0000 (17:31 -0500)]
Fix signature for pointer motion event.

15 years agoFeed button events through compositor.
Kristian Høgsberg [Wed, 10 Dec 2008 18:16:50 +0000 (13:16 -0500)]
Feed button events through compositor.

This also generalizes the code to send events to a surface a bit.

15 years agoPut Wayland under the MIT license.
Kristian Høgsberg [Tue, 2 Dec 2008 20:15:01 +0000 (15:15 -0500)]
Put Wayland under the MIT license.

15 years agoConvert touchpad absolute events to relative.
Kristian Høgsberg [Wed, 26 Nov 2008 04:16:31 +0000 (23:16 -0500)]
Convert touchpad absolute events to relative.

15 years agoAdd keyboard input, move input device creation to compositor.
Kristian Høgsberg [Mon, 24 Nov 2008 05:31:49 +0000 (00:31 -0500)]
Add keyboard input, move input device creation to compositor.

15 years agoAdd missing breaks in evdev switch.
Kristian Høgsberg [Mon, 24 Nov 2008 05:13:13 +0000 (00:13 -0500)]
Add missing breaks in evdev switch.

15 years agoRename input.c to evdev.c.
Kristian Høgsberg [Mon, 24 Nov 2008 05:12:20 +0000 (00:12 -0500)]
Rename input.c to evdev.c.

15 years agoInitial commit.
Kristian Høgsberg [Tue, 30 Sep 2008 13:46:10 +0000 (09:46 -0400)]
Initial commit.

This has the basic event loop, and a first cut of the libffi dispatcher.