aboutsummaryrefslogtreecommitdiff
path: root/unstable
AgeCommit message (Collapse)Author
2018-12-14linux-explicit-synchronization: Clarify implicit synchronization guarantees ↵Alexandros Frantzis
of release events Clarify that after zwp_buffer_release_v1 events, otherwise unused buffers can be reused without any additional implicit synchronization. This is in contrast to wl_buffer.release, which doesn't guarantee that implicit synchronization is not required to safely use a buffer after the event is received. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-12-14linux-explicit-synchronization: Warn about using the protocol while using ↵Alexandros Frantzis
graphics APIs Graphics APIs are expected to use this protocol under the hood, and since there can only be one user of explicit synchronization per surface, warn about using the protocol directly in such cases. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-12-14linux-explicit-synchronization: Allow fences with opaque EGL buffersAlexandros Frantzis
Add opaque EGL buffers to the supported buffer types for use with the explicit synchronization protocol. Opaque EGL buffers rely on the same EGL implementation in both the compositor and clients, which makes it straightforward to manage client expectations about fence support for such buffers. Also make it clearer that implementations are free to support other buffer types beyond the required ones. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-11-12unstable: add primary-selection protocolemersion
This primary selection is similar in spirit to the eponimous in X11, allowing a quick "select text + middle click" shortcut to copying and pasting. It's otherwise very similar to its Wayland counterpart, and explicitly made consistent with it. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2018-11-12Add zwp_linux_explicit_synchronization_v1Alexandros Frantzis
This protocol enables explicit synchronization of asynchronous graphics operations on buffers on a per-commit basis. Support is currently limited to dmabuf buffers and dma_fence fence FDs. Explicit synchronization provides a more versatile notification mechanism for buffer readiness and availability, and can be used to improve efficiency by integrating with related functionality in display and graphics APIs. This protocol is also useful in ChromeOS ARC++ (running Android apps inside ChromeOS, using Wayland as the communication protocol), where it can enable integration of the ChromeOS compositor with the explicit synchronization mechanisms of the Android display subsystem. Finally, the per-commit nature of the release events provided by this protocol potentially offers a solution to a deficiency of the wl_buffer.release event (see https://gitlab.freedesktop.org/wayland/wayland/issues/46). Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com> [Pekka: dropped Reveman from maintainers] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2018-07-31fullscreen-shell: Add missing license tagJohan Klokkhammer Helsing
Although it would probably default to the license at the root of the repository anyway, it's best to be explicit about it, and also be consistent with the other extensions. The copyright holders have been assembled from git history and the README. Signed-off-by: Johan Klokkhammer Helsing <johan.helsing@qt.io> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2018-07-30text-input: Add v3 of the text-input protocolCarlos Garnacho
This new protocol description is an evolution of v2. - All pre-edit text styling is gone. - Pre-edit cursor can span characters. - No events regarding input panel (OSK) state nor covered rectangle. Compositors are still free to handle situations where the keyboard focus rectangle is covered by the input panel. - No set_preferred_language request for clients. - There is no event to send keysyms. Compositors can use wl_keyboard interface instead. - All state is double-buffered, with specified defaults. - The compositor can be notified about external changes to the state. - The client can detect outdated requests. Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@puri.sm> Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Simon Ser <contact@emersion.fr>
2018-07-16xdg-output: add a transform example for the logical sizeSimon Ser
Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2018-07-04unstable: add xdg-decoration protocolSimon Ser
This adds a new protocol to negotiate server-side rendering of window decorations for xdg-toplevels. This allows compositors that want to draw decorations themselves to send their preference to clients, and clients that prefer server-side decorations to request them. This is inspired by a protocol from KDE [1] which has been implemented in KDE and Sway and was submitted for consideration in 2017 [2]. This patch provides an updated protocol with those concerns taken into account. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Drew DeVault <sir@cmpwn.com> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Eike Hein <hein@kde.org> Reviewed-by: Alan Griffiths <alan.griffiths@canonical.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> [1] https://github.com/KDE/kwayland/blob/master/src/client/protocols/server-decoration.xml [2] https://lists.freedesktop.org/archives/wayland-devel/2017-October/035564.html
2018-05-03xdg-output: Add name and description eventsDrew DeVault
This adds two events to the protocol. The goal is to allow clients to give the user the ability to select outputs with the same names the compositor uses and to identify outputs consistently across sessions. The output name is a short and stiff identifier with strict limits on permitted characters, which is suitable for storing in config files, command line arguments, etc. A warmer "description" event is also provided to (optionally) provide a more human readable name, and has much broader restrictions on its form. Signed-off-by: Drew DeVault <sir@cmpwn.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> [Jonas: Fixed formatting and commit subject] Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2018-01-19unstable: Add input-timestamps protocolAlexandros Frantzis
wl_pointer, wl_keyboard and wl_touch events currently use a 32-bit timestamp with millisecond resolution. In some cases, notably latency measurements, this resolution is too coarse to be useful. This protocol provides additional high-resolution timestamps events, which are emitted before the corresponding input event. Each timestamp event contains a high-resolution, and ideally higher-accuracy, version of the 'time' argument of the first subsequent supported input event. Clients that care about high-resolution timestamps just need to keep track of the last timestamp event they receive and associate it with the next supported input event that arrives. Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-10-11xdg-foreign-v2: Rename export and import callsMarco Martin
As export is a reserved keyword in C++, in order for the output generated by wayland_scanner to compile correctly rename export to export_toplevel and import to import_toplevel this needs a new protocol version as is an incompatible change [jadahl: Fix various documentation issues] Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-09-26Add a new version of the xdg-foreign protocolMarco Martin
Some methods will be renamed, so we need a new, not retrocompatible protocol. Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-31Add xdg-output protocolOlivier Fourdan
This protocol aims at describing outputs in way which is more in line with the concept of an output on desktop oriented systems. Some information are more specific to the concept of an output for a desktop oriented system and may not make sense in other applications, such as IVI systems for example. The goal is to gradually move the desktop specific concepts out of the core wl_output protocol. For now it just features the position and logical size which describe the output position and size in the global compositor space. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-07-11Add keyboard shortcuts inhibitorOlivier Fourdan
This adds a new protocol to let Wayland clients specify that they want all keyboard events to be sent to the client, regardless of the compositor own shortcuts. This protocol can be used for virtual machine and remote connection viewers which require to pass all keyboard shortcuts to the hosted or remote system instead of being caught up by the compositor locally. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-11Introduce keyboard grabbing protocol for XwaylandOlivier Fourdan
This patch introduces a new protocol for grabbing the keyboard from Xwayland. This is needed for X11 applications that map an override redirect window (thus not focused by the window manager) and issue an active grab on the keyboard to capture all keyboard events. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-05-20linux-dmabuf: Bump main protocol versionDaniel Stone
Unfortunately this hunk fell out during a rebase. Sorry! Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-05-19linux-dmabuf: advertise format modifiers with modifier eventVarad Gautam
advertise the supported fourcc format modifiers along with supported formats to the client. the 'modifier' event introduced here is intended to replace the 'format' event from zwp_linux_dmabuf_v1 version 1. bump zwp_linux_dmabuf_v1, zwp_linux_buffer_params_v1 interface versions to 3. v2: specify request name in event description for clarity (Yong Bakos) v3: grammar fixup (Yong Bakos) v4: add deprecation warning against 'format' event usage (pq) Signed-off-by: Varad Gautam <varad.gautam@collabora.com> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-05-19linux-dmabuf: add immediate dmabuf import pathVarad Gautam
provide a mechanism that allows clients to import the added dmabufs and immediately use the newly created wl_buffers without waiting on an event. this is useful to clients that are sure of their import request succeeding, and wish to avoid the wl_buffer communication roundtrip. bump zwp_linux_dmabuf_v1, zwp_linux_buffer_params_v1 interface versions. v2: specify using incorrectly imported dmabufs as undefined behavior instead of sending success/failure events. (pq, daniels) v3: preserve the optional protocol error added in v2 and explicitly state the outcome of import success or failure (pq) v4: clarify create_immed failure cases and error codes (pq) Signed-off-by: Varad Gautam <varad.gautam@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-27linux-dmabuf-unstable: Use standard copyright noticeYong Bakos
Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-17xdg-shell: require popups to intersect with or be adjacent to parent surfacesMike Blumenkrantz
some restrictions must be placed on this or else it becomes legal for the compositor to place popups in unexpected locations Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-11-21linux-dmabuf: clarify format event descriptionVarad Gautam
clearly state the request name in format event to avoid abmiguous interpretation between 'zwp_linux_buffer_params_v1::create' and 'zwp_linux_dmabuf_v1::create_params' requests. v2: grammar fixup (Yong Bakos) Signed-off-by: Varad Gautam <varad.gautam@collabora.com> Suggested-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21(multiple): Remove inconsistent line breaksYong Bakos
Enum entries and message arguments are sometimes preceded by a blank line, but often aren't. Standardize the format of the protocol specification by removing blank lines preceding a list of message arguments and enum entries. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21idle-inhibit: Lead with a verb in request descriptionBryce Harrington
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-09-16input-method: Lead with a verb in request descriptionsBryce Harrington
Make all the descriptions consistent by starting the description with a simple verb (set instead of sets, etc.) Add or rework a few of the existing descriptions to fit this form. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-09-14input-method: Correct grammarBryce Harrington
These should all be pretty straightforward; there are no behavioral changes. Signed-off-by: Bryce Harrington <bryce@bryceharrington.org> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-08-30xdg-shell: Correct grammarYong Bakos
Adjust minor grammar issues, for clarity. This patch cherry-picks some relevant changes from an earlier series, patches 3 to 5. See: https://lists.freedesktop.org/archives/wayland-devel/2016-April/028078.html Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30text-input: Correct grammarYong Bakos
Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30text-input: Rename text-input to text_inputYong Bakos
Interface names are lower_snake_case, and corresponding descriptions should match, for accuracy and clarity. This renaming only affects description text, to follow the convention that exists elswhere in this protocol document and in other protocol docs, when referring to interface names. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30text-input: Fix indentation and paragraph whitespaceYong Bakos
Replace the tab indentation of the MIT license with appropriate spaces. Add one missing line break between two description paragraphs. Adjust two line breaks to keep descriptions under 80 chars / line. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15xdg-shell: Add resize_x/y constraint adjustment to positionerJonas Ådahl
In order to get feedback of available space where a client can create its popup, let it create requset that its popup rectangle being resized would it not fit the within the work area. This adds two new constraint adjustment values to the adjustment enum, and dimension parameters to the xdg_popup.configure event. The existing constraint adjustment actions take precedence, and resizing will only be triggered if all other adjustments requested didn't manage to make the popup rectangle fully visible. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Drop desktop environment specific state allocationsJonas Ådahl
Instead of allocating state ranges that desktop environments can use as they want, let them introduce their own protocol and their own enums. If such desktop environment protocols need the configure/ack_configure semantics, they can design their protocols to extend xdg_surface, and make their private configure events a latched state tied to xdg_surface.configure. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net> Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15xdg-shell: Clarify focus semantics for popup grabsJonas Ådahl
Make it clearer what the focus semantics are during a popup grab. In short, when a grabbing popup is mapped, the top most popup will always have keyboard focus, while pointer and touch focus works just as normal except that only surfaces from the grabbing client will receive pointer and touch focus. This patch doesn't really change any semantics but rather clarifies what was ambiguous before. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-08-15xdg-shell: Introduce xdg_positionerJonas Ådahl
xdg_positioner is a method for declarative positioning of child surfaces (currently only xdg_popup surfaces). A client creates a description of a positioning logic using the xdg_positioner interface. The xdg_positioner object is then used when creating a xdg_popup for describing how the child surface should be positioned in relation to the parent surface. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Mike Blumenkrantz <zmike@samsung.com> Acked-by: Yong Bakos <ybakos@humanoriented.com> Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15xdg-shell: Make xdg_popup non-grabbing by defaultJonas Ådahl
Turn xdg_popup into plain temporary child surfaces without any grabbing or mapping order requirements by default. In order to create grabbing popup chains, a new request 'grab' is introduced which enables more or less the same semantics and requirements as xdg_popup previously had related to grabbing, stacking and mapping order. This enables using xdg_popup for creating tooltips and other user interface elements that does not want to take an explicit grab. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Mike Blumenkrantz <zmike@samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Make get_popup take a xdg_surface instead of wl_surfaceJonas Ådahl
The reason for using wl_surface before was that xdg_popup and xdg_surface (now xdg_toplevel) had no common interface other than wl_surface, but since xdg_surface is now the base interface, lets use that. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Improve error enum formatting someJonas Ådahl
The long lines stood out, break them by putting the summary on its own line. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Add error codes for invalid surface stateJonas Ådahl
Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Put xdg_shell events after requestsJonas Ådahl
It makes the structure consistent with most other protocols and provides a clear separation between what is done by the server and what is done by the client. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Turn xdg_surface into a generic base interfaceJonas Ådahl
Split out toplevel window like requests and events into a new interface called xdg_toplevel, and turn xdg_surface into a generic base interface which others extends. xdg_popup is changed to extend the xdg_surface. The configure event in xdg_surface was split up making xdg_surface.configure an event only carrying the serial number, while a new xdg_toplevel.configure event carries the other data previously sent via xdg_surface.configure. xdg_toplevel.configure is made to extend, via the latch-state mechanism, xdg_surface.configure and depends on that event to synchronize state. Other future xdg_surface based extensions are meant to also extend xdg_surface.configure for relevant window type dependend state synchronization. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Mike Blumenkrantz <zmike@samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Acked-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2016-08-15xdg-shell: Add min/max size requestsOlivier Fourdan
Some application may wish to restrict their window in size, but xdg-shell has no mechanism for the client to specify a maximum or minimum size. As a result, the compositor may try to maximize or fullscreen a window while the client would not allow for the requested size. Add new requests "set_max_size" and "set_min_size" to xdg-shell so that the client can tell the compositor what would be its smallest/largest acceptable size, and that the compositor can decide if maximize or fullscreen is achievable, draw an accurate animation, etc. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764413 Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15xdg-shell: clarify xdg_surface creation semantics regarding buffersMike Blumenkrantz
this change ensures that the client will set its initial state before performing any drawing, ensuring that there is no mismatch when creating a surface with a non-default state (eg. maximize, fullscreen, ...) looking at the following event flows: 1) wl_surface.attach, wl_surface.commit, xdg_shell.get_xdg_surface 2) wl_surface.attach, xdg_shell.get_xdg_surface, wl_surface.commit 3) xdg_shell.get_xdg_surface, wl_surface.commit, xdg_surface.configure, wl_surface.attach, wl_surface.commit only 3) is now valid, while 1) and 2) will trigger errors as a result of handling buffers prior to creating the xdg surface Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com> Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-15xdg-shell: Remove the old unstable version enum and requestJonas Ådahl
As of version 6, the new unstable protocol discovery semantics are used, so lets remove the enum and request that made up the old one. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15xdg-shell: Bump unstable version to 6Jonas Ådahl
This copies the version 5 of the XML to a new version 6 version, while at the same time the interface names are changed to use the unstable naming convention. A whitespace cleanup was done as no git-blame:ability would be lost anyway. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-08-12Add screensaver idle inhibitor protocolBryce Harrington
This interface allows disabling of screensaver/screenblanking on a per-surface basis. As long as the surface remains visible and non-occluded it blocks the screensaver, etc. from activating on the output(s) that the surface is visible on. To uninhibit, simply destroy the inhibitor object. Signed-off-by: Bryce Harrington <bryce@bryceharrington.org> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-12Introduce xdg-foreign protocolJonas Ådahl
xdg-foreign is a protocol meant to enable setting up inter surface relationships across clients. Potential use cases are out-of-process dialogs, such as file dialogs, meant to be used by sandboxed processes that may not have the access it needs to implement such dialogs. It works by enabling a client to export a surface, creating a handle for the exported surface. The handle, in form of a unique string, may be shared in some way with other clients (for example the provider of the file dialog) which can then import the exported surface. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2016-07-20tablet: Add pad support to the tablet protocolCarlos Garnacho
The pad's interface is similar to the tool interface, a client is notified of the pad after the tablet_added event. The pad has three functionalities: buttons, rings and strips. Buttons are fairly straightforward, rings and strips are separate interfaces with pointer-axis-like source/value/frame events. The two interfaces are effectively identical but for the actual value they send (degrees vs normalized position). Buttons are sequentially indexed starting with zero, unlike other protocols where a linux/input.h-style semantic event code is used. Since we expect all buttons to have client-specific functionality, an additional event tells the client when a given button index is not available, usually because the compositor assignes some function to it (e.g. mode switching, see below). Specific to the pad device is the set_feedback request which enables a client to set a user-defined string to display for an OSD on the current mappings. This request is available for buttons, rings and strips. Finally, the pad supports groups, effectively sets of button/ring/strip configurations. Those groups may have multiple modes each, so that users/clients may map several actions to a single element. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20tablet: restrict the cursor surface to one per toolPeter Hutterer
The initial approach was to allow one surface to be re-used between tools, seats and even used together as wl_pointer cursor surface. This has a few drawbacks, most of which are related to managing the surface correctly in the compositor. For example, the same cursor surface could have two different hotspots. Animated cursors should animate independently rather than update at the same time. Furthermore: a client cannot know when a surface will cease being used as a cursor surface. The basic assumption of "after focus out" is an implementation detail in the compositor and unless the client unsets the cursor it is not guaranteed that the surface is released. This again makes sharing a surface less obvious - you cannot know if the wl_pointer surface is still in use when you set it for a new wp_tablet_tool. Avoid these headaches (and push some of them to the client) by simply restricting a wl_surface to be assigned to a single tool. For the 99% use case where we have one tablet with two tools (pen + eraser) this means we merely get two extra surfaces, and the two don't usually share the same cursor shape anyway. If sharing is absolutely necessary, a client may still opt to share the underlying wl_buffer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20tablet: change all degree values from int to wl_fixedPeter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-07-20tablet: add v2 of the tablet protocolPeter Hutterer
This is a straightforward copy/paste with a _v1 -> _v2 rename. No functional changes otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>