Commit graph

27 commits

Author SHA1 Message Date
Daniel Stone
3544c6dcc4 protocols: Add GitLab contact information
This is useful to know who to ping when you want to change something.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2024-10-09 09:07:11 +00:00
Derek Foreman
c5b47dc928 various: Fix definition of double-buffered state
The strict "mailbox" model of wayland past is not how modern compositors
process commits, and many explanations of how double buffered state is
applied throughout wayland-protocols are no longer strictly accurate.

Instead of trying to define double-buffered state at every point of use,
just reference the evolving definition of wl_surface.commit.

This still leaves a few old definitions that weren't trivially updated.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2024-05-06 09:45:35 +00:00
Mikhail Gusarov
275fce4af9 xdg-shell: Clarify relationship between [un]set_maximized and configure
Make it explicit in the protocol that [un]set_maximized and
the following configure event can't be reliably matched, and the
clients shouldn't try to do it.

Closes #106

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2023-03-30 20:47:28 +00:00
Xaver Hugl
5c274ffc90 unstable/xdg-shell v6: clarify when which errors are used
Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2023-03-30 15:44:07 +00:00
Vlad Zahorodnii
6be6e00c02 Use correct indefinite article before "xdg"
Since the abbreviation "XDG" starts with a vowel sound, the correct
article is "an."

Signed-off-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
2020-06-19 12:45:12 +03: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
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
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
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
Jonas Ådahl
8315aaf1ac xdg-shell: Turn xdg_surface into a generic base interface
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-15 10:25:31 +08:00
Olivier Fourdan
46f5d23844 xdg-shell: Add min/max size requests
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-15 10:25:31 +08:00
Mike Blumenkrantz
3acad73c32 xdg-shell: clarify xdg_surface creation semantics regarding buffers
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-15 10:25:31 +08:00
Jonas Ådahl
57592798bf xdg-shell: Remove the old unstable version enum and request
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-15 10:25:31 +08:00
Jonas Ådahl
89cadb4354 xdg-shell: Bump unstable version to 6
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-15 10:25:31 +08:00
Jonas Ådahl
418915eeba Revert "xdg-shell: clarify xdg_surface creation semantics regarding buffers"
This patch was intended to be part of the coming v6 version of the
xdg_shell protocol. It is an semantically backward incompatible change,
so it cannot be implemented in xdg_shell v5 without breaking
compatibility with available clients.

This reverts commit 275fd34023.
2016-03-09 15:49:51 +08:00
Mike Blumenkrantz
275fd34023 xdg-shell: clarify xdg_surface creation semantics regarding buffers
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

Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-03-08 23:32:51 -08:00
Mike Blumenkrantz
a5585f3de3 xdg-shell: add state range reservation for EFL
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2015-12-07 10:18:05 +08:00
Peter Hutterer
5315fdabd4 xdg_shell: add missing <description> tags to the 'state' enum entries
The scanner parses CDATA in <entry> but lets it disappear otherwise. To have
descriptive text associated with the <entry>, we need a <description> tag -
and that must have a summary attribute. The current scanner doesn't handle
<description> however, so to get the summary printed in the output file we
still need the summary attribute in the entry tag too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-11-20 17:26:15 +08:00
Jonas Ådahl
6c3112e5dc Migrate xdg_shell protocol
This migration did not involve any renaming, xdg_shell already has its
own form of unstable protocol semantics. The next xdg_shell protocol
change will change to the new naming semantics, and not earlier in
order to minimize breakage.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2015-10-30 15:20:47 +08:00