summaryrefslogtreecommitdiff
path: root/src/libinput-seat.c
Commit message (Collapse)AuthorAgeFilesLines
* libinput: Remove unused static valuesDaniel Stone2016-05-041-3/+0
| | | | | | | default_seat and default_seat_name are not used anywhere in this file. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* input: Split get_udev_seat() into its own functionDerek Foreman2015-10-141-5/+12
| | | | | | | | | We're going to need this on device removal in the future, so pull it out into a separate function now. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* cosmetic: add missing line between variable declarations and codeDerek Foreman2015-09-301-0/+1
| | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* input: when destroying a seat, remove keyboard focus firstDerek Foreman2015-08-071-1/+2
| | | | | | | | | If we destroy all the devices before trying to remove keyboard focus we'll segfault because we destroyed the keyboard. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Ryo Munakata <ryomnktml@gmail.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* input: Don't test keyboard/pointer/touch pointersDerek Foreman2015-07-311-5/+10
| | | | | | | | | | | | | | Keyboards and pointers aren't freed when devices are removed, so we should really be testing keyboard_device_count and pointer_device_count in most cases, not the actual pointers. Otherwise we end up with different behaviour after removing a device than we had before it was inserted. This commit renames the touch/keyboard/pointer pointers and adds helper functions to get them that hide this complexity and return NULL when *_device_count is 0. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* input: make a function for device removalDerek Foreman2015-07-171-3/+9
| | | | | | | Break device_removed() out into its own function like device_added(). Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* Unified multiple definitions of container_of() macro.Jon Cruz2015-06-151-0/+1
| | | | | | | | | Removed duplicate definitions of the container_of() macro and refactored sources to use the single implementation. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* src: Update boilerplate from MIT X11 license to MIT Expat licenseBryce Harrington2015-06-151-16/+19
|
* input: don't assume outputs have namesDerek Foreman2015-03-181-1/+2
| | | | | | | If an output is unnamed and devices are in seats, the strcmp will crash. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* libinput: default to INFO log levelPekka Paalanen2014-09-121-8/+8
| | | | | | | | | Set the default logging level from libinput to INFO. This matches better the behaviour of the old input backend, and prints the found input devices into Weston's log. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Jonas Ådahl <jadahl@gmail.com>
* Require libinput 0.4.0Peter Hutterer2014-06-251-11/+21
| | | | | | | | | | No functional changes, just adjusting for API changes in libinput: - libinput_destroy() replaced by libinput_unref() - log functions now take a libinput context, userdata is gone - udev seat creation is now libinput_udev_create_context() and libinput_udev_assign_seat() Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* libinput-seat: literal values for WESTON_LIBINPUT_LOG_PRIORITYU. Artie Eoff2014-05-091-1/+8
| | | | | | | Only accept specific literal values from the environment variable WESTON_LIBINPUT_LOG_PRIORITY... "debug", "info", or "error". Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* input: Fix errors due to initializing input before creating outputsAnder Conselvan de Oliveira2014-04-251-2/+6
| | | | | | | Make sure that we don't map a device to an invalid output pointer and intead remap devices when an output is created. v2: fix the error with libinput too.
* evdev: Discard events from a touchscreen paired with an unplugged outputAnder Conselvan de Oliveira2014-04-251-3/+1
| | | | | | | | | | | | | | | Commit 17bccaed intended to make the events coming from a touchscreen paired with an unplugged output to be discarded, while an unpaired one would just choose a different output. However, the logic was inverted causing the opposite to happen. Later in commit 161c6c56, the default behavior was changed to map an output to a default output if the one specified via udev is not present. This change is reverted by this patch. v2: undo the change from commit 161c6c56. v3: deal with libinput too.
* Check zalloc return for out of memory situationBryce W. Harrington2014-04-251-1/+1
| | | | | | | Most zalloc calls in weston are checked, this fixes a handful that were being ignored. As found by `grep -EIsr "[^x]zalloc\(" . -A1` Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
* seat: don't break in notify_output_createU. Artie Eoff2014-04-211-1/+0
| | | | | | | | | If more than one input device maps to the new output, then we need to map all devices to that output... not just the first device. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77576 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* input: fix input device map to output if it doesn't exist.U. Artie Eoff2014-04-211-1/+3
| | | | | | | | | | | | | | | | | | | If an input device wants to map to an output that does not exist, then just map it to the first output. Also, if a device is mapped to an output that gets unplugged then it gets default mapped to the first output in the output destroy listener. However, the original output destroy listener needs to be removed before adding the new listener for the first output, otherwise the list gets corrupted. Later if the other output is plugged back in, we remap the device to it. In that case, we should remove the destroy listener for the first output. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=77341 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* libinput-seat: allow setting libinput log priority in westonU. Artie Eoff2014-04-211-0/+7
| | | | | | | | | | | | | | Look for WESTON_LIBINPUT_LOG_PRIORITY environment variable. If it exists then use it to set the libinput log priority. Otherwise, don't set the priority and get whatever libinput's default priority is. Setting WESTON_LIBINPUT_LOG_PRIORITY=0 allows us to log which input devices are detected at Weston startup and makes it a little more consistent with Weston's original evdev input setup log messages... and useful for debugging and testing. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* libinput-seat: redirect libinput log to weston logU. Artie Eoff2014-04-211-0/+9
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=77578 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
* Add libinput based input device backendJonas Ådahl2014-03-121-0/+353
While disable by default, passing --enable-libinput-backend to ./configure switches the input backend in weston's drm, fbdev and rpi compositing backends to use libinput instead of udev-seat.c, evdev.c and friends. When enabled, weston now also depends on libinput >= 0.1.0. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>