summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Daniel Stone [Wed, 30 May 2012 15:32:06 +0000 (16:32 +0100)]
Add keymap argument to weston_seat_init_keyboard
This allows backends to generate their own keymaps and pass them in for
use rather than always forcing a single global keymap, which is
particularly useful for nested compositors.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:32:02 +0000 (16:32 +0100)]
Split weston_seat_init up into pointer/keyboard/touch
So we don't unnecessarily advertise interfaces the seat doesn't support.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:57 +0000 (16:31 +0100)]
Convert notify_axis to wl_fixed_t
In preparation for the rest of the axis code changing.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:52 +0000 (16:31 +0100)]
Use enum wl_keyboard_key_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_keyboard_key_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:51 +0000 (16:31 +0100)]
Use enum wl_pointer_button_state instead of integer
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:49 +0000 (16:31 +0100)]
evdev: Add LED update hook
Simply pushes the updated LEDs through to all keyboard attached to the
seat.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:48 +0000 (16:31 +0100)]
evdev: Add device capabilities
Does what it says on the box: lists whether or not the device supports
key, absolute, relative or touch classes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:47 +0000 (16:31 +0100)]
Rename evdev_input_device::type to pending_events
Since that's what it actually is, rather than a description of the
device as such.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone [Wed, 30 May 2012 15:31:46 +0000 (16:31 +0100)]
evdev: Convert device type to an enum
Rather than using #defines.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Jonas Ådahl [Thu, 17 May 2012 10:18:17 +0000 (12:18 +0200)]
evdev: Improve touchpad support and add motion filters
Touchpad related code has been rewritten and moved to its own file
accessed by evdev via the dispatch interface.
The various functionality implemented are anti-jitter (don't jumping
around), smoother motions, touch detection, pointer acceleration and
some more.
Pointer acceleration is implemented as one generic part, and one touch
specific part (a profile).
Some ideas and magic numbers comes from xserver and
xf86-input-synaptics.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 17 May 2012 10:18:16 +0000 (12:18 +0200)]
evdev: Add event process dispatching
By setting an 'evdev_dispatch' struct in 'evdev_input_device' during
device configuration the 'process' function in the associated interface
will be called with received input events. If none is set, a fallback
handler will be set instead that handle generic input functionality.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Daniel Stone [Wed, 16 May 2012 17:45:18 +0000 (18:45 +0100)]
Convert wl_input_device to wl_seat (and friends)
wl_input_device has been both renamed and split. wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.
It now only generates one event: to let clients know that it has new
capabilities. It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.
This commit tracks these changes in weston and the clients, as well as
similar renames (e.g. weston_input_device -> weston_seat). Some other
changes were necessary, e.g. renaming the name for the visible mouse
sprite from 'pointer' to 'cursor' so as to not conflict.
For simplicity, every seat is always exposed with all three interfaces,
although this will change as time goes on.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Jonas Ådahl [Thu, 10 May 2012 20:46:48 +0000 (16:46 -0400)]
evdev: Use wl_fixed_t for relative motions
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Kristian Høgsberg [Wed, 9 May 2012 16:19:04 +0000 (12:19 -0400)]
compositor: Use wl_fixed_t for incoming input events
This changes notify_motion, notify_pointer_focus and notify_touch to take
wl_fixed_t types for input coordinates.
Jonas Ådahl [Wed, 9 May 2012 06:46:44 +0000 (08:46 +0200)]
evdev: Convert wl_fixed_t to int before using internally
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Pekka Paalanen [Fri, 30 Mar 2012 12:20:23 +0000 (15:20 +0300)]
compositor: move libudev.h to evdev.h
Compositor core does not do anything with udev, so the header is not
needed there. Move the #include into evdev.h, from where it gets used by
compositor-drm.c, too.
Also fix the fallout:
tty.c: In function 'tty_create':
tty.c:143:2: warning: implicit declaration of function 'fstat'
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Thu, 12 Apr 2012 02:42:15 +0000 (22:42 -0400)]
Follow wayland change to serial numbers
Kristian Høgsberg [Tue, 10 Apr 2012 04:03:30 +0000 (00:03 -0400)]
evdev: Get key state from kernel on vt enter
We need this to correctly initialize compositor key state, modifier state and
to send the right keys in the key enter event.
Benjamin Franzke [Mon, 9 Apr 2012 16:14:58 +0000 (18:14 +0200)]
evdev: Disable the udev monitor when another vt becomes active
We dont want to receive hotplug events while being inactive.
When getting back active we enumerate all devices and would end up
with two sources for one device that may be hotplugged in the mean time.
Benjamin Franzke [Mon, 30 Jan 2012 13:04:04 +0000 (14:04 +0100)]
Introduce weston-launch
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.
Execution is allowed for local-active sessions
or users in the group weston-launch.
Jonas Ådahl [Wed, 28 Mar 2012 20:36:09 +0000 (22:36 +0200)]
Properly dispose event sources and event loops
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Tiago Vignatti [Tue, 27 Mar 2012 18:26:01 +0000 (21:26 +0300)]
evdev: reuse code for device removal
Just like device_added, now the routines to close the compositor and vt switch
leave are using the same code to remove a device.
This patch also closes properly a mtdev device, bug spotted by Christopher
Michael.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Scott Moreau [Thu, 22 Mar 2012 16:47:01 +0000 (10:47 -0600)]
Hook up axis events.
Ander Conselvan de Oliveira [Tue, 20 Mar 2012 23:52:57 +0000 (19:52 -0400)]
evdev: fix input lag when processing input from output repaint
When the compositor is in a repaint cycle, input is processed only once
per frame. However, a call to evdev_input_device_data() would handle at
most 8 events at time. When there was more than 8 events pending for a
given frame, input lag would occur. This was most visible with multi
touch input.
This patch changes the evdev_input_device_data() so that it will handle
all the events available in the fd. In order to do that, the fd is put
in non-blocking mode, so that it is possible to loop on read and stop
on EAGAIN instead of blocking.
Tiago Vignatti [Fri, 16 Mar 2012 20:33:03 +0000 (17:33 -0300)]
evdev: use mtdev for multitouch devices
mtdev library translates all multitouch based devices to the slotted evdev
protocol. It provides an uniform interface for Weston, which eases mt
implementation when dealing with a big variety of devices.
Weston on drm now directly depends on such library.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Kristian Høgsberg [Mon, 5 Mar 2012 22:49:30 +0000 (17:49 -0500)]
compositor: Move input devices to their own event loop
First step towards only handling input at repaint time.
Kristian Høgsberg [Tue, 24 Jan 2012 17:37:17 +0000 (12:37 -0500)]
Revert "weston: Drop priviledges early, and seteuid when needed"
This reverts commit
fc6ccb868fa735ee9c6592806f381aa1262bf0b2.
We still need root permissions for drmDrop/SetMaster. Without
integration with ConsoleKit or systemd we also don't have access
to /dev/dri/cardX in the case where we open a new VT.
Benjamin Franzke [Tue, 24 Jan 2012 15:37:15 +0000 (16:37 +0100)]
weston: Drop priviledges early, and seteuid when needed
Tiago Vignatti [Fri, 20 Jan 2012 16:47:46 +0000 (18:47 +0200)]
evdev: fix uninitialised pointer value
==30224== Conditional jump or move depends on uninitialised value(s)
==30224== at 0x40EE3A0: evdev_flush_motion (evdev.c:284)
==30224== by 0x40EE6DC: evdev_input_device_data (evdev.c:352)
==30224== by 0x4034710: wl_event_source_fd_dispatch (event-loop.c:76)
==30224== by 0x4035171: wl_event_loop_dispatch (event-loop.c:462)
==30224== by 0x4032F76: wl_display_run (wayland-server.c:785)
==30224== by 0x8050972: main (compositor.c:2183)
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Mon, 16 Jan 2012 15:54:07 +0000 (10:54 -0500)]
evdev: Drop noisy debug messages on vt swtich
Olivier Le Thanh Duong [Sat, 14 Jan 2012 14:57:34 +0000 (15:57 +0100)]
evdev: Correct warning on missing input device
Pekka Paalanen [Thu, 5 Jan 2012 14:41:21 +0000 (16:41 +0200)]
evdev: warn about missing input devices
Usually there should be at least one input device, when Weston starts
up, or is reactivated by a VT switch. Add a nice warning, in case there
are no input devices.
This is to give a clue to users who happen to try Weston on DRM, and
do not get any response.
Add also a message to another failure case, that may lead to missing
input devices.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Tue, 3 Jan 2012 15:29:47 +0000 (10:29 -0500)]
Rename wayland-compositor to weston
This rename addresses a few problems around the split between core
Wayland and the wayland-demos repository.
1) Initially, we had one big repository with protocol code, sample
compositor and sample clients. We split that repository to make it
possible to implement the protocol without pulling in the sample/demo
code. At this point, the compositor is more than just a "demo" and
wayland-demos doesn't send the right message. The sample compositor
is a useful, self-contained project in it's own right, and we want to
move away from the "demos" label.
2) Another problem is that the wayland-demos compositor is often
called "the wayland compsitor", but it's really just one possible
compositor. Existing X11 compositors are expected to add Wayland
support and then gradually phase out/modularize the X11 support, for
example. Conversely, it's hard to talk about the wayland-demos
compositor specifically as opposed to, eg, the wayland protocol or a
wayland compositor in general.
We are also renaming the repo to weston, and the compositor
subdirectory to src/, to emphasize that the main "output" is the
compositor.
Kristian Høgsberg [Thu, 22 Dec 2011 03:54:49 +0000 (22:54 -0500)]
clients: Add simple-touch client for testing touch events.
Kristian Høgsberg [Thu, 22 Dec 2011 03:18:36 +0000 (22:18 -0500)]
evdev: Store positions for all touch points in the evdev device
We need to store all touchpoint positions so that if we just get an
ABS_MT_POSITION_X or Y event, we can pull the other coordinate from the
cache. And we need this across invocations of evdev_input_device_data(),
so the accumulator approach doesn't work.
Instead, we go back to the approach of storing all this state in the
evdev device struct and we might as well just move the rel and abs state
there too.
Tiago Vignatti [Wed, 21 Dec 2011 17:34:09 +0000 (19:34 +0200)]
evdev: Add ABS_MT_* support for direct touch devices
This adds ABS_MT_* support for direct touch devices and notifies
the compositor. The compositor has a stub for now.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 23:14:03 +0000 (01:14 +0200)]
evdev: new header file for the driver
Besides the new header file, there's also a change in the main evdev creation
procedure for a more suggestive name (evdev_input_add_devices ->
evdev_input_create). There's no real functional changes in this commit.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 22:32:48 +0000 (00:32 +0200)]
compositor-drm: remove/add evdev devices when vt switches
Reported-by: Ran Benite <ran234@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 21:52:18 +0000 (23:52 +0200)]
compositor-drm: destroy evdev driver properly when finishing compositor
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
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>
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>
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>
Kristian Høgsberg [Fri, 2 Dec 2011 11:39:02 +0000 (06:39 -0500)]
evdev: Silence warning
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.
Kristian Høgsberg [Wed, 23 Nov 2011 00:24:25 +0000 (19:24 -0500)]
Simplify evdev_flush_motion() a tiny bit
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
Matt Peterson [Mon, 1 Aug 2011 19:46:29 +0000 (13:46 -0600)]
Relative movement with a touchpad and other misc fixes for events
Kristian Høgsberg [Thu, 21 Jul 2011 13:46:26 +0000 (06:46 -0700)]
evdev: Only add event devices
Kristian Høgsberg [Tue, 19 Jul 2011 23:10:11 +0000 (16:10 -0700)]
compositor: Use systemd seats for input devices as well
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.
Kristian Høgsberg [Fri, 14 Jan 2011 19:49:46 +0000 (14:49 -0500)]
Some kind of support for touchscreen
Kristian Høgsberg [Fri, 14 Jan 2011 19:45:42 +0000 (14:45 -0500)]
Split out evdev handling to its own file
Kristian Høgsberg [Fri, 11 Jun 2010 16:56:24 +0000 (12:56 -0400)]
Split native drm part of compositor out
Kristian Høgsberg [Sat, 5 Jun 2010 01:52:02 +0000 (21:52 -0400)]
Rename wayland-system-compositor back to just 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.
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.
Kristian Høgsberg [Wed, 10 Dec 2008 22:31:44 +0000 (17:31 -0500)]
Fix signature for pointer motion event.
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.
Kristian Høgsberg [Tue, 2 Dec 2008 20:15:01 +0000 (15:15 -0500)]
Put Wayland under the MIT license.
Kristian Høgsberg [Wed, 26 Nov 2008 04:16:31 +0000 (23:16 -0500)]
Convert touchpad absolute events to relative.
Kristian Høgsberg [Mon, 24 Nov 2008 05:31:49 +0000 (00:31 -0500)]
Add keyboard input, move input device creation to compositor.
Kristian Høgsberg [Mon, 24 Nov 2008 05:13:13 +0000 (00:13 -0500)]
Add missing breaks in evdev switch.
Kristian Høgsberg [Mon, 24 Nov 2008 05:12:20 +0000 (00:12 -0500)]
Rename input.c to evdev.c.
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.