Commit graph

194 commits

Author SHA1 Message Date
Jonas Ådahl
a8a7b0b213 xdg-shell: Fix typo
There is no configure 'request' only configure 'events'.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mike Blumenkrantz <zmike@samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
8f96c079d2 xdg-shell/positioner: Clarify flip semantics with anchor offset
While there is no currently known usages of setting an anchor offset on
the same axis as the 'flip' constraint action is set, it must still be
specified so compositors behave the same.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-11-21 16:25:51 +08:00
David Edmundson
6bff136f30 xdg-shell/positioner: Replace edge bitfield with extended enum
Bitfields allowed for impossible combinations of anchor edges, such as
being on the left and right edge. Use of explicit enumerations means we
don't need to handle that case.

Signed-off-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-11-21 16:25:51 +08:00
Mike Blumenkrantz
0c761706bb xdg-shell: clarify map/unmap wording
ensure that this is as precise and explicit as possible for all useful
cases and also define previously-unspecified behavior

Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
a3cf97ff98 xdg-shell/popup: Allow custom parent by passing null as parent
Allow using some other protocol (custom, or future xdg_* based) to set
up the parent-child relationship of a popup. This allows future
protocols to use xdg_popup when mapping popups over surfaces not based
on xdg_surface.

An example use case for this is the window menu, where a shells UI
client can use xdg_popup to create popup menus over windows it does not
have a xdg_surface of by having a custom protocol setting up the proper
parent-child relationship.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
bb632281d0 xdg-shell/toplevel: Chain multiple parent-child relationships
Change the semantics of xdg_toplevel.set_parent to allow chaining
multiple parent-child relationships together, while allowing
arbitrarily unmapping parents, while keeping what is left over of the
chain intact.

This makes things easier to manage when parent-child relationships
cross client borders, for example when using xdg_foreign.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
4fd4d23481 xdg-shell/toplevel: Clarify xdg_toplevel.set_parent(null)
Setting a null-surface as a toplevel parent should unset the
parent-child relationship. This was not specified, so lets do that.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
43a09b1577 xdg-shell/surface: Add note about window position and geometry
A client might want to change the window geometry without wanting the
window to be moved, for example when changing the width of the border.
Point out that the compositor should treat the (x,y) coordinate of the
geometry as the top-left corner of the window, and not change the
position of the window as it appears on the screen if the (x,y)
coordinate changes.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
af6cf5ecac xdg-shell: Replace 'monitor' with 'output'
There is no such thing as 'monitor' in Wayland, only outputs.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
e49a2c0b56 xdg-shell/positioner: Allow empty anchor_rect
Allow setting an empty anchor rectangle, so that one can map a popup
against a coordinate, not a pixel.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
092c976606 xdg-shell: Reword the xdg_wm_base introduction
Don't refer to things as "traditional desktop" as it is not defined
nor clear what that refers to; instead reword things in a more explicit
way. A reason for this is that xdg-shell is not strictly meant only for
traditional window stacking based desktop environments, but should be
equally suitable for stacking, tiling and potentially other styles as
well.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
505a4f5daf xdg-shell: Update copyright notices
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Acked-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
709a1a0c9a xdg-shell: Rename interfaces
Rename the interfaces according to the wayland-protocols policy. Since
the name 'xdg_shell' as an interface was already taken (by
xdg-shell-unstable-v5) zxdg_shell_v6 was renamed xdg_wm_base. The
surface role related interfaces were not renamed, as naming collision
is only unmanagable when exposed as globals via the registry.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-By: Mike Blumenkrantz <zmike@osg.samsung.com>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
fcb2a63c84 Add xdg-shell to stable/
Add a copy of xdg-shell unstable v6 to stable/xdg-shell/xdg-shell.xml.
Folliwing this commit, it will go through a set of changes, before
being declared stable.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2017-11-21 16:25:51 +08:00
Jonas Ådahl
fc3305c362 configure.ac: Bump version to 1.11
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-10-11 16:20:05 +08:00
Marco Martin
70d85926c6 xdg-foreign-v2: Rename export and import calls
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-10-11 09:01:22 +08:00
Marco Martin
72699573cc Add a new version of the xdg-foreign protocol
Some methods will be renamed, so we need a new, not retrocompatible
protocol.

Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-09-26 09:49:23 -04:00
Tomek Bury
875130ee3c Use sysroot prefix for pkgdatadir variable
The pc_sysroot is automatically added to cflags and libs but not
to 'pkg-config --variable'

Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-08-30 14:04:02 +01:00
Jonas Ådahl
9ee1d597a6 configure.ac: Bump version to 1.10
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-31 18:57:58 +08:00
Olivier Fourdan
6b62c3211d configure.ac: force autotool to use star
To circumvent the 99 character filename limit.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-31 18:57:58 +08:00
Olivier Fourdan
794a96a80f Add xdg-output protocol
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-31 18:15:45 +08:00
Jonas Ådahl
7af21d83d3 configure.ac: Bump version to 1.9
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2017-07-11 14:41:21 +08:00
Olivier Fourdan
e16986b3d2 Add keyboard shortcuts inhibitor
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-11 14:18:39 +08:00
Olivier Fourdan
0a61d3516b Introduce keyboard grabbing protocol for Xwayland
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-07-11 14:18:39 +08:00
Daniel Stone
26c99346ab Bump version to 1.8
Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-06-12 10:27:44 +01:00
Daniel Stone
c438cbe7dc linux-dmabuf: Bump main protocol version
Unfortunately this hunk fell out during a rebase. Sorry!

Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-05-20 16:12:23 +01:00
Varad Gautam
4ecdb097db linux-dmabuf: advertise format modifiers with modifier event
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-19 10:53:30 +01:00
Varad Gautam
a840b3634a linux-dmabuf: add immediate dmabuf import path
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-05-19 10:53:22 +01:00
Yong Bakos
ab228a6721 linux-dmabuf-unstable: Use standard copyright notice
Signed-off-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-01-27 11:58:50 +00:00
Mike Blumenkrantz
375385e3d2 xdg-shell: require popups to intersect with or be adjacent to parent surfaces
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>
2017-01-17 21:29:13 +08:00
Varad Gautam
642dd7af50 linux-dmabuf: clarify format event description
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 11:24:24 +00:00
Yong Bakos
59b6e208e0 (multiple): Remove inconsistent line breaks
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-21 11:20:27 +00:00
Bryce Harrington
f7349c3ff1 idle-inhibit: Lead with a verb in request description
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-21 11:14:17 +00:00
Bryce Harrington
a1d574fabe input-method: Lead with a verb in request descriptions
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-16 09:17:30 -07:00
Bryce Harrington
427d52e86f input-method: Correct grammar
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-09-14 14:48:42 -07:00
Yong Bakos
1392110d38 xdg-shell: Correct grammar
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-30 17:13:08 +08:00
Yong Bakos
d2ba6ad422 text-input: Correct grammar
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-30 17:13:08 +08:00
Yong Bakos
594bb8e093 text-input: Rename text-input to text_input
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-30 17:13:08 +08:00
Yong Bakos
c5802797bd text-input: Fix indentation and paragraph whitespace
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-30 17:13:08 +08:00
Reynaldo H. Verdejo Pinochet
4253ad0b99 buildsystem: add -uninstalled.pc pkg-config file
For building against an uninstalled wayland-protocols tree

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-30 17:13:08 +08:00
Jonas Ådahl
2e541a36de configure.ac: Bump version to 1.7
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2016-08-15 10:33:32 +08:00
Jonas Ådahl
c09e89929b xdg-shell: Add resize_x/y constraint adjustment to positioner
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-15 10:25:31 +08:00
Jonas Ådahl
7ba6a6ab15 xdg-shell: Drop desktop environment specific state allocations
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-15 10:25:31 +08:00
Jonas Ådahl
3dab2f13f7 xdg-shell: Clarify focus semantics for popup grabs
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-15 10:25:31 +08:00
Jonas Ådahl
dee23fd0cf xdg-shell: Introduce xdg_positioner
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-15 10:25:31 +08:00
Jonas Ådahl
eef4b95f59 xdg-shell: Make xdg_popup non-grabbing by default
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-15 10:25:31 +08:00
Jonas Ådahl
88390eddf5 xdg-shell: Make get_popup take a xdg_surface instead of wl_surface
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-15 10:25:31 +08:00
Jonas Ådahl
4c6cdfa2b6 xdg-shell: Improve error enum formatting some
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-15 10:25:31 +08:00
Jonas Ådahl
2258fa64c9 xdg-shell: Add error codes for invalid surface state
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-15 10:25:31 +08:00
Jonas Ådahl
5f694ca7e4 xdg-shell: Put xdg_shell events after requests
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-15 10:25:31 +08:00