Commit 175faa36 authored by Simon Ser's avatar Simon Ser
Browse files

xdg-shell: introduce toplevel wm_capabilities

Some compositors don't implement all of the features of xdg-shell.
This results in UI elements (e.g. buttons) in clients which do
nothing when activated.

Add a wm_capabilities event to allow clients to hide these UI elements
when they don't make sense.
Signed-off-by: Simon Ser's avatarSimon Ser <>
Closes: wayland/wayland-protocols#64
parent 40cb7d47
Pipeline #446558 passed with stages
in 57 seconds
......@@ -29,7 +29,7 @@
<interface name="xdg_wm_base" version="3">
<interface name="xdg_wm_base" version="4">
<description summary="create desktop-style surfaces">
The xdg_wm_base interface is exposed as a global object enabling clients
to turn their wl_surfaces into windows in a desktop environment. It
......@@ -117,7 +117,7 @@
<interface name="xdg_positioner" version="3">
<interface name="xdg_positioner" version="4">
<description summary="child surface positioner">
The xdg_positioner provides a collection of rules for the placement of a
child surface relative to a parent surface. Rules can be defined to ensure
......@@ -401,7 +401,7 @@
<interface name="xdg_surface" version="3">
<interface name="xdg_surface" version="4">
<description summary="desktop user interface surface base interface">
An interface that may be implemented by a wl_surface, for
implementations that provide a desktop-style user interface.
......@@ -576,7 +576,7 @@
<interface name="xdg_toplevel" version="3">
<interface name="xdg_toplevel" version="4">
<description summary="toplevel surface">
This interface defines an xdg_surface role which allows a surface to,
among other things, set window-like properties such as maximize,
......@@ -1069,9 +1069,44 @@
a dialog to ask the user to save their data, etc.
<!-- Version 4 additions -->
<enum name="wm_capabilities" since="4">
<entry name="window_menu" value="1" summary="show_window_menu is available"/>
<entry name="maximized" value="2" summary="set_maximized and unset_maximized are available"/>
<entry name="fullscreen" value="3" summary="set_fullscreen and unset_fullscreen are available"/>
<entry name="minimized" value="4" summary="set_minimized is available"/>
<event name="wm_capabilities" since="4">
<description summary="compositor capabilities">
This event advertises the capabilities supported by the compositor. If
a capability isn't supported, clients should hide or disable the UI
elements that expose this functionality. For instance, if the
compositor doesn't advertise support for minimized toplevels, a button
triggering the set_minimized request should be hidden.
The compositor will ignore requests it doesn't support. For instance,
a compositor which doesn't advertise support for minimized will ignore
set_minimized requests.
This event is sent initially once before the first
xdg_surface.configure event. When the compositor capabilities change,
this event is sent again and is followed by a xdg_surface.configure
The configured state should not be applied immediately. See
xdg_surface.configure for details.
The capabilities are sent as an array of 32-bit unsigned integers in
native endianness.
<arg name="capabilities" type="array" summary="array of 32-bit capabilities"/>
<interface name="xdg_popup" version="3">
<interface name="xdg_popup" version="4">
<description summary="short-lived, popup surfaces for menus">
A popup surface is a short-lived, temporary surface. It can be used to
implement for example menus, popovers, tooltips and other similar user
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment