mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-02-06 04:06:19 -05:00
Core Wayland window system code and protocol
The frame event groups separate pointer events together. The primary use-case for this at the moment is diagonal scrolling - a vertical/horizontal scroll event can be grouped together to calculate the correct motion vector. Frame events group all wl_pointer events. An example sequence of motion events followed by a diagonal scroll followed by a button event is: wl_pointer.motion wl_pointer.frame wl_pointer.motion wl_pointer.frame wl_pointer.axis wl_pointer.axis wl_pointer.frame wl_pointer.button wl_pointer.frame In the future, other extensions may insert additional information about an event into the frame. For example, an extension may add information about the physical device that generated an event into the frame. For this reason, enter/leave events are grouped by a frame event too. The axis_source event determines how an axis event was generated. That enables clients to judge when to use kinetic scrolling. Only one axis_source event is allowed per frame and applies to all events in this frame. The axis_stop event notifies a client about the termination of a scroll sequence, likewise needed to calculate kinetic scrolling parameters. Multiple axis_stop events within the same frame indicate that scrolling has stopped in all these axis at the same time. The axis_discrete event provides the wheel click count. Previously the axis value was some hardcoded number (10), with the discrete steps this enables a client to differ between line-based scrolling on a mouse wheel and smooth scrolling with a touchpad. The axis_discrete event carries the axis information and the discrete value and can occur at any time in the frame provided it is ordered before the matching axis event. Specifically, this sequence is valid: wl_pointer.axis_source wl_pointer.axis_discrete (vert) wl_pointer.axis_discrete (horiz) wl_pointer.axis (horiz) wl_pointer.axis (vert) wl_pointer.frame Enter and leave event also trigger wl_pointer.frame events, where possible the compositor should group leave and subsequent enter into the same frame. This indicates to the client that the pointer has moved between surfaces and may allow a client to shortcut code otherwise triggerd by the leave or enter events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> |
||
|---|---|---|
| cursor | ||
| doc | ||
| m4 | ||
| protocol | ||
| spec | ||
| src | ||
| tests | ||
| .gitignore | ||
| autogen.sh | ||
| configure.ac | ||
| COPYING | ||
| Makefile.am | ||
| publish-doc | ||
| README | ||
| TODO | ||
| wayland-scanner.m4 | ||
| wayland-scanner.mk | ||
What is Wayland?
Wayland is a project to define a protocol for a compositor to talk to
its clients as well as a library implementation of the protocol. The
compositor can be a standalone display server running on Linux kernel
modesetting and evdev input devices, an X application, or a wayland
client itself. The clients can be traditional applications, X servers
(rootless or fullscreen) or other display servers.
The wayland protocol is essentially only about input handling and
buffer management. The compositor receives input events and forwards
them to the relevant client. The clients creates buffers and renders
into them and notifies the compositor when it needs to redraw. The
protocol also handles drag and drop, selections, window management and
other interactions that must go through the compositor. However, the
protocol does not handle rendering, which is one of the features that
makes wayland so simple. All clients are expected to handle rendering
themselves, typically through cairo or OpenGL.
The weston compositor is a reference implementation of a wayland
compositor and the weston repository also includes a few example
clients.
Building the wayland libraries is fairly simple, aside from libffi,
they don't have many dependencies:
$ git clone git://anongit.freedesktop.org/wayland/wayland
$ cd wayland
$ ./autogen.sh --prefix=PREFIX
$ make
$ make install
where PREFIX is where you want to install the libraries. See
http://wayland.freedesktop.org for more complete build instructions
for wayland, weston, xwayland and various toolkits.