diff --git a/src/wayland/protocols/xdg-shell-client-header.h b/src/wayland/protocols/xdg-shell-client-header.h index b77db1e00..1ed941f9f 100644 --- a/src/wayland/protocols/xdg-shell-client-header.h +++ b/src/wayland/protocols/xdg-shell-client-header.h @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.19.0 */ +/* Generated by wayland-scanner 1.16.0 */ #ifndef XDG_SHELL_CLIENT_PROTOCOL_H #define XDG_SHELL_CLIENT_PROTOCOL_H @@ -58,8 +58,6 @@ struct xdg_surface; struct xdg_toplevel; struct xdg_wm_base; -#ifndef XDG_WM_BASE_INTERFACE -#define XDG_WM_BASE_INTERFACE /** * @page page_iface_xdg_wm_base xdg_wm_base * @section page_iface_xdg_wm_base_desc Description @@ -82,9 +80,6 @@ struct xdg_wm_base; * creating transient windows such as popup menus. */ extern const struct wl_interface xdg_wm_base_interface; -#endif -#ifndef XDG_POSITIONER_INTERFACE -#define XDG_POSITIONER_INTERFACE /** * @page page_iface_xdg_positioner xdg_positioner * @section page_iface_xdg_positioner_desc Description @@ -107,7 +102,7 @@ extern const struct wl_interface xdg_wm_base_interface; * For an xdg_positioner object to be considered complete, it must have a * non-zero size set by set_size, and a non-zero anchor rectangle set by * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an error. + * positioning a surface raises an invalid_positioner error. * @section page_iface_xdg_positioner_api API * See @ref iface_xdg_positioner. */ @@ -132,12 +127,9 @@ extern const struct wl_interface xdg_wm_base_interface; * For an xdg_positioner object to be considered complete, it must have a * non-zero size set by set_size, and a non-zero anchor rectangle set by * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an error. + * positioning a surface raises an invalid_positioner error. */ extern const struct wl_interface xdg_positioner_interface; -#endif -#ifndef XDG_SURFACE_INTERFACE -#define XDG_SURFACE_INTERFACE /** * @page page_iface_xdg_surface xdg_surface * @section page_iface_xdg_surface_desc Description @@ -167,10 +159,13 @@ extern const struct wl_interface xdg_positioner_interface; * manipulate a buffer prior to the first xdg_surface.configure call must * also be treated as errors. * - * After creating a role-specific object and setting it up, the client must + * After creating a role-specific object and setting it up (e.g. by sending + * the title, app ID, size constraints, parent, etc), the client must * perform an initial commit without any buffer attached. The compositor - * will reply with an xdg_surface.configure event. The client must - * acknowledge it and is then allowed to attach a buffer to map the surface. + * will reply with initial wl_surface state such as + * wl_surface.preferred_buffer_scale followed by an xdg_surface.configure + * event. The client must acknowledge it and is then allowed to attach a + * buffer to map the surface. * * Mapping an xdg_surface-based role surface is defined as making it * possible for the surface to be shown by the compositor. Note that @@ -185,7 +180,8 @@ extern const struct wl_interface xdg_positioner_interface; * * A newly-unmapped surface is considered to have met condition (1) out * of the 3 required conditions for mapping a surface if its role surface - * has not been destroyed. + * has not been destroyed, i.e. the client must perform the initial commit + * again before attaching a buffer. * @section page_iface_xdg_surface_api API * See @ref iface_xdg_surface. */ @@ -217,10 +213,13 @@ extern const struct wl_interface xdg_positioner_interface; * manipulate a buffer prior to the first xdg_surface.configure call must * also be treated as errors. * - * After creating a role-specific object and setting it up, the client must + * After creating a role-specific object and setting it up (e.g. by sending + * the title, app ID, size constraints, parent, etc), the client must * perform an initial commit without any buffer attached. The compositor - * will reply with an xdg_surface.configure event. The client must - * acknowledge it and is then allowed to attach a buffer to map the surface. + * will reply with initial wl_surface state such as + * wl_surface.preferred_buffer_scale followed by an xdg_surface.configure + * event. The client must acknowledge it and is then allowed to attach a + * buffer to map the surface. * * Mapping an xdg_surface-based role surface is defined as making it * possible for the surface to be shown by the compositor. Note that @@ -235,12 +234,10 @@ extern const struct wl_interface xdg_positioner_interface; * * A newly-unmapped surface is considered to have met condition (1) out * of the 3 required conditions for mapping a surface if its role surface - * has not been destroyed. + * has not been destroyed, i.e. the client must perform the initial commit + * again before attaching a buffer. */ extern const struct wl_interface xdg_surface_interface; -#endif -#ifndef XDG_TOPLEVEL_INTERFACE -#define XDG_TOPLEVEL_INTERFACE /** * @page page_iface_xdg_toplevel xdg_toplevel * @section page_iface_xdg_toplevel_desc Description @@ -251,13 +248,17 @@ extern const struct wl_interface xdg_surface_interface; * id, and well as trigger user interactive operations such as interactive * resize and move. * + * A xdg_toplevel by default is responsible for providing the full intended + * visual representation of the toplevel, which depending on the window + * state, may mean things like a title bar, window controls and drop shadow. + * * Unmapping an xdg_toplevel means that the surface cannot be shown * by the compositor until it is explicitly mapped again. * All active operations (e.g., move, resize) are canceled and all * attributes (e.g. title, state, stacking, ...) are discarded for * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to * the state it had right after xdg_surface.get_toplevel. The client - * can re-map the toplevel by perfoming a commit without any buffer + * can re-map the toplevel by performing a commit without any buffer * attached, waiting for a configure event and handling it as usual (see * xdg_surface description). * @@ -274,22 +275,23 @@ extern const struct wl_interface xdg_surface_interface; * id, and well as trigger user interactive operations such as interactive * resize and move. * + * A xdg_toplevel by default is responsible for providing the full intended + * visual representation of the toplevel, which depending on the window + * state, may mean things like a title bar, window controls and drop shadow. + * * Unmapping an xdg_toplevel means that the surface cannot be shown * by the compositor until it is explicitly mapped again. * All active operations (e.g., move, resize) are canceled and all * attributes (e.g. title, state, stacking, ...) are discarded for * an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to * the state it had right after xdg_surface.get_toplevel. The client - * can re-map the toplevel by perfoming a commit without any buffer + * can re-map the toplevel by performing a commit without any buffer * attached, waiting for a configure event and handling it as usual (see * xdg_surface description). * * Attaching a null buffer to a toplevel unmaps the surface. */ extern const struct wl_interface xdg_toplevel_interface; -#endif -#ifndef XDG_POPUP_INTERFACE -#define XDG_POPUP_INTERFACE /** * @page page_iface_xdg_popup xdg_popup * @section page_iface_xdg_popup_desc Description @@ -350,7 +352,6 @@ extern const struct wl_interface xdg_toplevel_interface; * for the xdg_popup state to take effect. */ extern const struct wl_interface xdg_popup_interface; -#endif #ifndef XDG_WM_BASE_ERROR_ENUM #define XDG_WM_BASE_ERROR_ENUM @@ -379,6 +380,10 @@ enum xdg_wm_base_error { * the client provided an invalid positioner */ XDG_WM_BASE_ERROR_INVALID_POSITIONER = 5, + /** + * the client didn’t respond to a ping event in time + */ + XDG_WM_BASE_ERROR_UNRESPONSIVE = 6, }; #endif /* XDG_WM_BASE_ERROR_ENUM */ @@ -398,7 +403,9 @@ struct xdg_wm_base_listener { * Compositors can use this to determine if the client is still * alive. It's unspecified what will happen if the client doesn't * respond to the ping request, or in what timeframe. Clients - * should try to respond in a reasonable amount of time. + * should try to respond in a reasonable amount of time. The + * “unresponsive” error is provided for compositors that wish + * to disconnect unresponsive clients. * * A compositor is free to ping in any way it wants, but a client * must always respond to any xdg_wm_base object it created. @@ -474,7 +481,7 @@ xdg_wm_base_get_version(struct xdg_wm_base *xdg_wm_base) * * Destroying a bound xdg_wm_base object while there are surfaces * still alive created by this xdg_wm_base object instance is illegal - * and will result in a protocol error. + * and will result in a defunct_surfaces error. */ static inline void xdg_wm_base_destroy(struct xdg_wm_base *xdg_wm_base) @@ -510,7 +517,7 @@ xdg_wm_base_create_positioner(struct xdg_wm_base *xdg_wm_base) * itself is not a role, the corresponding surface may only be assigned * a role extending xdg_surface, such as xdg_toplevel or xdg_popup. It is * illegal to create an xdg_surface for a wl_surface which already has an - * assigned role and this will result in a protocol error. + * assigned role and this will result in a role error. * * This creates an xdg_surface for the given surface. An xdg_surface is * used as basis to define a role to a given surface, such as xdg_toplevel @@ -535,7 +542,8 @@ xdg_wm_base_get_xdg_surface(struct xdg_wm_base *xdg_wm_base, struct wl_surface * * @ingroup iface_xdg_wm_base * * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_wm_base.ping. + * the client may be deemed unresponsive. See xdg_wm_base.ping + * and xdg_wm_base.error.unresponsive. */ static inline void xdg_wm_base_pong(struct xdg_wm_base *xdg_wm_base, uint32_t serial) @@ -752,7 +760,8 @@ xdg_positioner_set_anchor(struct xdg_positioner *xdg_positioner, uint32_t anchor * specified (e.g. 'bottom_right' or 'top_left'), then the child surface * will be placed towards the specified gravity; otherwise, the child * surface will be centered over the anchor point on any axis that had no - * gravity specified. + * gravity specified. If the gravity is not in the ‘gravity’ enum, an + * invalid_input error is raised. */ static inline void xdg_positioner_set_gravity(struct xdg_positioner *xdg_positioner, uint32_t gravity) @@ -860,9 +869,30 @@ xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint3 #ifndef XDG_SURFACE_ERROR_ENUM #define XDG_SURFACE_ERROR_ENUM enum xdg_surface_error { + /** + * Surface was not fully constructed + */ XDG_SURFACE_ERROR_NOT_CONSTRUCTED = 1, + /** + * Surface was already constructed + */ XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED = 2, + /** + * Attaching a buffer to an unconfigured surface + */ XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER = 3, + /** + * Invalid serial number when acking a configure event + */ + XDG_SURFACE_ERROR_INVALID_SERIAL = 4, + /** + * Width or height was zero or negative + */ + XDG_SURFACE_ERROR_INVALID_SIZE = 5, + /** + * Surface was destroyed before its role object + */ + XDG_SURFACE_ERROR_DEFUNCT_ROLE_OBJECT = 6, }; #endif /* XDG_SURFACE_ERROR_ENUM */ @@ -967,7 +997,8 @@ xdg_surface_get_version(struct xdg_surface *xdg_surface) * @ingroup iface_xdg_surface * * Destroy the xdg_surface object. An xdg_surface must only be destroyed - * after its role object has been destroyed. + * after its role object has been destroyed, otherwise + * a defunct_role_object error is raised. */ static inline void xdg_surface_destroy(struct xdg_surface *xdg_surface) @@ -1029,8 +1060,7 @@ xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *paren * portions like drop-shadows which should be ignored for the * purposes of aligning, placing and constraining windows. * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. + * The window geometry is double-buffered state, see wl_surface.commit. * * When maintaining a position, the compositor should treat the (x, y) * coordinate of the window geometry as the top left corner of the window. @@ -1046,13 +1076,22 @@ xdg_surface_get_popup(struct xdg_surface *xdg_surface, struct xdg_surface *paren * commit. This unset is meant for extremely simple clients. * * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. + * the wl_surface associated with this xdg_surface, and may extend outside + * of the wl_surface itself to mark parts of the subsurface tree as part of + * the window geometry. * - * The width and height must be greater than zero. Setting an invalid size - * will raise an error. When applied, the effective window geometry will be - * the set window geometry clamped to the bounding rectangle of the - * combined geometry of the surface of the xdg_surface and the associated + * When applied, the effective window geometry will be the set window + * geometry clamped to the bounding rectangle of the combined + * geometry of the surface of the xdg_surface and the associated * subsurfaces. + * + * The effective geometry will not be recalculated unless a new call to + * set_window_geometry is done and the new pending surface state is + * subsequently applied. + * + * The width and height of the effective window geometry must be + * greater than zero. Setting an invalid size will raise an + * invalid_size error. */ static inline void xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height) @@ -1075,6 +1114,8 @@ xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int3 * * If the client receives multiple configure events before it * can respond to one, it only has to ack the last configure event. + * Acking a configure event that was never sent raises an invalid_serial + * error. * * A client is not required to commit immediately after sending * an ack_configure request - it may even ack_configure several times @@ -1083,6 +1124,17 @@ xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int3 * A client may send multiple ack_configure requests before committing, but * only the last request sent before a commit indicates which configure * event the client really is responding to. + * + * Sending an ack_configure request consumes the serial number sent with + * the request, as well as serial numbers sent by all configure events + * sent on this xdg_surface prior to the configure event referenced by + * the committed serial. + * + * It is an error to issue multiple ack_configure requests referencing a + * serial from the same configure event, or to issue an ack_configure + * request referencing a serial from a configure event issued before the + * event identified by the last ack_configure request for the same + * xdg_surface. Doing so will raise an invalid_serial error. */ static inline void xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) @@ -1091,6 +1143,24 @@ xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) XDG_SURFACE_ACK_CONFIGURE, serial); } +#ifndef XDG_TOPLEVEL_ERROR_ENUM +#define XDG_TOPLEVEL_ERROR_ENUM +enum xdg_toplevel_error { + /** + * provided value is not a valid variant of the resize_edge enum + */ + XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE = 0, + /** + * invalid parent toplevel + */ + XDG_TOPLEVEL_ERROR_INVALID_PARENT = 1, + /** + * client provided an invalid min or max size + */ + XDG_TOPLEVEL_ERROR_INVALID_SIZE = 2, +}; +#endif /* XDG_TOPLEVEL_ERROR_ENUM */ + #ifndef XDG_TOPLEVEL_RESIZE_EDGE_ENUM #define XDG_TOPLEVEL_RESIZE_EDGE_ENUM /** @@ -1117,10 +1187,11 @@ enum xdg_toplevel_resize_edge { #define XDG_TOPLEVEL_STATE_ENUM /** * @ingroup iface_xdg_toplevel - * the surface is tiled + * surface repaint is suspended * - * The window is currently in a tiled layout and the bottom edge is - * considered to be adjacent to another part of the tiling grid. + * The surface is currently not ordinarily being repainted; for + * example because its content is occluded by another window, or its + * outputs are switched off due to screen locking. */ enum xdg_toplevel_state { /** @@ -1155,6 +1226,10 @@ enum xdg_toplevel_state { * @since 2 */ XDG_TOPLEVEL_STATE_TILED_BOTTOM = 8, + /** + * @since 6 + */ + XDG_TOPLEVEL_STATE_SUSPENDED = 9, }; /** * @ingroup iface_xdg_toplevel @@ -1172,8 +1247,34 @@ enum xdg_toplevel_state { * @ingroup iface_xdg_toplevel */ #define XDG_TOPLEVEL_STATE_TILED_BOTTOM_SINCE_VERSION 2 +/** + * @ingroup iface_xdg_toplevel + */ +#define XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION 6 #endif /* XDG_TOPLEVEL_STATE_ENUM */ +#ifndef XDG_TOPLEVEL_WM_CAPABILITIES_ENUM +#define XDG_TOPLEVEL_WM_CAPABILITIES_ENUM +enum xdg_toplevel_wm_capabilities { + /** + * show_window_menu is available + */ + XDG_TOPLEVEL_WM_CAPABILITIES_WINDOW_MENU = 1, + /** + * set_maximized and unset_maximized are available + */ + XDG_TOPLEVEL_WM_CAPABILITIES_MAXIMIZE = 2, + /** + * set_fullscreen and unset_fullscreen are available + */ + XDG_TOPLEVEL_WM_CAPABILITIES_FULLSCREEN = 3, + /** + * set_minimized is available + */ + XDG_TOPLEVEL_WM_CAPABILITIES_MINIMIZE = 4, +}; +#endif /* XDG_TOPLEVEL_WM_CAPABILITIES_ENUM */ + /** * @ingroup iface_xdg_toplevel * @struct xdg_toplevel_listener @@ -1223,6 +1324,61 @@ struct xdg_toplevel_listener { */ void (*close)(void *data, struct xdg_toplevel *xdg_toplevel); + /** + * recommended window geometry bounds + * + * The configure_bounds event may be sent prior to a + * xdg_toplevel.configure event to communicate the bounds a window + * geometry size is recommended to constrain to. + * + * The passed width and height are in surface coordinate space. If + * width and height are 0, it means bounds is unknown and + * equivalent to as if no configure_bounds event was ever sent for + * this surface. + * + * The bounds can for example correspond to the size of a monitor + * excluding any panels or other shell components, so that a + * surface isn't created in a way that it cannot fit. + * + * The bounds may change at any point, and in such a case, a new + * xdg_toplevel.configure_bounds will be sent, followed by + * xdg_toplevel.configure and xdg_surface.configure. + * @since 4 + */ + void (*configure_bounds)(void *data, + struct xdg_toplevel *xdg_toplevel, + int32_t width, + int32_t height); + /** + * 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 not be displayed. + * + * 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. + * + * Compositors must send this event once before the first + * xdg_surface.configure event. When the capabilities change, + * compositors must send this event again and then send an + * xdg_surface.configure event. + * + * 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. + * @param capabilities array of 32-bit capabilities + * @since 5 + */ + void (*wm_capabilities)(void *data, + struct xdg_toplevel *xdg_toplevel, + struct wl_array *capabilities); }; /** @@ -1259,6 +1415,14 @@ xdg_toplevel_add_listener(struct xdg_toplevel *xdg_toplevel, * @ingroup iface_xdg_toplevel */ #define XDG_TOPLEVEL_CLOSE_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_toplevel + */ +#define XDG_TOPLEVEL_CONFIGURE_BOUNDS_SINCE_VERSION 4 +/** + * @ingroup iface_xdg_toplevel + */ +#define XDG_TOPLEVEL_WM_CAPABILITIES_SINCE_VERSION 5 /** * @ingroup iface_xdg_toplevel @@ -1358,19 +1522,23 @@ xdg_toplevel_destroy(struct xdg_toplevel *xdg_toplevel) * Set the "parent" of this surface. This surface should be stacked * above the parent surface and all other ancestor surfaces. * - * Parent windows should be set on dialogs, toolboxes, or other + * Parent surfaces should be set on dialogs, toolboxes, or other * "auxiliary" surfaces, so that the parent is raised when the dialog * is raised. * - * Setting a null parent for a child window removes any parent-child - * relationship for the child. Setting a null parent for a window which - * currently has no parent is a no-op. + * Setting a null parent for a child surface unsets its parent. Setting + * a null parent for a surface which currently has no parent is a no-op. * - * If the parent is unmapped then its children are managed as - * though the parent of the now-unmapped parent has become the - * parent of this surface. If no parent exists for the now-unmapped - * parent then the children are managed as though they have no - * parent surface. + * Only mapped surfaces can have child surfaces. Setting a parent which + * is not mapped is equivalent to setting a null parent. If a surface + * becomes unmapped, its children's parent is set to the parent of + * the now-unmapped surface. If the now-unmapped surface has no parent, + * its children's parent is unset. If the now-unmapped surface becomes + * mapped again, its parent-child relationship is not restored. + * + * The parent toplevel must not be one of the child toplevel's + * descendants, and the parent must be different from the child toplevel, + * otherwise the invalid_parent protocol error is raised. */ static inline void xdg_toplevel_set_parent(struct xdg_toplevel *xdg_toplevel, struct xdg_toplevel *parent) @@ -1422,7 +1590,7 @@ xdg_toplevel_set_title(struct xdg_toplevel *xdg_toplevel, const char *title) * application identifiers and how they relate to well-known D-Bus * names and .desktop files. * - * [0] http://standards.freedesktop.org/desktop-entry-spec/ + * [0] https://standards.freedesktop.org/desktop-entry-spec/ */ static inline void xdg_toplevel_set_app_id(struct xdg_toplevel *xdg_toplevel, const char *app_id) @@ -1441,7 +1609,8 @@ xdg_toplevel_set_app_id(struct xdg_toplevel *xdg_toplevel, const char *app_id) * This request asks the compositor to pop up such a window menu at * the given position, relative to the local surface coordinates of * the parent surface. There are no guarantees as to what menu items - * the window menu contains. + * the window menu contains, or even if a window menu will be drawn + * at all. * * This request must be used in response to some sort of user action * like a button press, key press, or touch down event. @@ -1507,12 +1676,13 @@ xdg_toplevel_move(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint3 * guarantee that the device focus will return when the resize is * completed. * - * The edges parameter specifies how the surface should be resized, - * and is one of the values of the resize_edge enum. The compositor - * may use this information to update the surface position for - * example when dragging the top left corner. The compositor may also - * use this information to adapt its behavior, e.g. choose an - * appropriate cursor image. + * The edges parameter specifies how the surface should be resized, and + * is one of the values of the resize_edge enum. Values not matching + * a variant of the enum will cause the invalid_resize_edge protocol error. + * The compositor may use this information to update the surface position + * for example when dragging the top left corner. The compositor may also + * use this information to adapt its behavior, e.g. choose an appropriate + * cursor image. */ static inline void xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uint32_t serial, uint32_t edges) @@ -1532,8 +1702,7 @@ xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uin * The width and height arguments are in window geometry coordinates. * See xdg_surface.set_window_geometry. * - * Values set in this way are double-buffered. They will get applied - * on the next commit. + * Values set in this way are double-buffered, see wl_surface.commit. * * The compositor can use this information to allow or disallow * different states like maximize or fullscreen and draw accurate @@ -1553,11 +1722,11 @@ xdg_toplevel_resize(struct xdg_toplevel *xdg_toplevel, struct wl_seat *seat, uin * request. * * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in a protocol error. + * a surface is illegal and will result in an invalid_size error. * * The width and height must be greater than or equal to zero. Using - * strictly negative values for width and height will result in a - * protocol error. + * strictly negative values for width or height will result in a + * invalid_size error. */ static inline void xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height) @@ -1577,8 +1746,7 @@ xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int3 * The width and height arguments are in window geometry coordinates. * See xdg_surface.set_window_geometry. * - * Values set in this way are double-buffered. They will get applied - * on the next commit. + * Values set in this way are double-buffered, see wl_surface.commit. * * The compositor can use this information to allow or disallow * different states like maximize or fullscreen and draw accurate @@ -1598,11 +1766,11 @@ xdg_toplevel_set_max_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int3 * request. * * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in a protocol error. + * a surface is illegal and will result in an invalid_size error. * * The width and height must be greater than or equal to zero. Using * strictly negative values for width and height will result in a - * protocol error. + * invalid_size error. */ static inline void xdg_toplevel_set_min_size(struct xdg_toplevel *xdg_toplevel, int32_t width, int32_t height) @@ -1900,8 +2068,8 @@ xdg_popup_get_version(struct xdg_popup *xdg_popup) * This destroys the popup. Explicitly destroying the xdg_popup * object will also dismiss the popup, and unmap the surface. * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. + * If this xdg_popup is not the "topmost" popup, the + * xdg_wm_base.not_the_topmost_popup protocol error will be sent. */ static inline void xdg_popup_destroy(struct xdg_popup *xdg_popup) @@ -1941,10 +2109,6 @@ xdg_popup_destroy(struct xdg_popup *xdg_popup) * nested grabbing popup as well. When a compositor dismisses popups, it * will follow the same dismissing order as required from the client. * - * The parent of a grabbing popup must either be another xdg_popup with an - * active explicit grab, or an xdg_popup or xdg_toplevel, if there are no - * explicit grabs already taken. - * * If the topmost grabbing popup is destroyed, the grab will be returned to * the parent of the popup, if that parent previously had an explicit grab. * diff --git a/src/wayland/protocols/xdg-shell.h b/src/wayland/protocols/xdg-shell.h index 62a261220..290f3ab95 100644 --- a/src/wayland/protocols/xdg-shell.h +++ b/src/wayland/protocols/xdg-shell.h @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.19.0 */ +/* Generated by wayland-scanner 1.16.0 */ /* * Copyright © 2008-2013 Kristian Høgsberg @@ -50,7 +50,7 @@ extern const struct wl_interface xdg_positioner_interface; extern const struct wl_interface xdg_surface_interface; extern const struct wl_interface xdg_toplevel_interface; -static const struct wl_interface *xdg_shell_types[] = { +static const struct wl_interface *types[] = { NULL, NULL, NULL, @@ -80,101 +80,103 @@ static const struct wl_interface *xdg_shell_types[] = { }; static const struct wl_message xdg_wm_base_requests[] = { - { "destroy", "", xdg_shell_types + 0 }, - { "create_positioner", "n", xdg_shell_types + 4 }, - { "get_xdg_surface", "no", xdg_shell_types + 5 }, - { "pong", "u", xdg_shell_types + 0 }, + { "destroy", "", types + 0 }, + { "create_positioner", "n", types + 4 }, + { "get_xdg_surface", "no", types + 5 }, + { "pong", "u", types + 0 }, }; static const struct wl_message xdg_wm_base_events[] = { - { "ping", "u", xdg_shell_types + 0 }, + { "ping", "u", types + 0 }, }; WL_PRIVATE const struct wl_interface xdg_wm_base_interface = { - "xdg_wm_base", 3, + "xdg_wm_base", 6, 4, xdg_wm_base_requests, 1, xdg_wm_base_events, }; static const struct wl_message xdg_positioner_requests[] = { - { "destroy", "", xdg_shell_types + 0 }, - { "set_size", "ii", xdg_shell_types + 0 }, - { "set_anchor_rect", "iiii", xdg_shell_types + 0 }, - { "set_anchor", "u", xdg_shell_types + 0 }, - { "set_gravity", "u", xdg_shell_types + 0 }, - { "set_constraint_adjustment", "u", xdg_shell_types + 0 }, - { "set_offset", "ii", xdg_shell_types + 0 }, - { "set_reactive", "3", xdg_shell_types + 0 }, - { "set_parent_size", "3ii", xdg_shell_types + 0 }, - { "set_parent_configure", "3u", xdg_shell_types + 0 }, + { "destroy", "", types + 0 }, + { "set_size", "ii", types + 0 }, + { "set_anchor_rect", "iiii", types + 0 }, + { "set_anchor", "u", types + 0 }, + { "set_gravity", "u", types + 0 }, + { "set_constraint_adjustment", "u", types + 0 }, + { "set_offset", "ii", types + 0 }, + { "set_reactive", "3", types + 0 }, + { "set_parent_size", "3ii", types + 0 }, + { "set_parent_configure", "3u", types + 0 }, }; WL_PRIVATE const struct wl_interface xdg_positioner_interface = { - "xdg_positioner", 3, + "xdg_positioner", 6, 10, xdg_positioner_requests, 0, NULL, }; static const struct wl_message xdg_surface_requests[] = { - { "destroy", "", xdg_shell_types + 0 }, - { "get_toplevel", "n", xdg_shell_types + 7 }, - { "get_popup", "n?oo", xdg_shell_types + 8 }, - { "set_window_geometry", "iiii", xdg_shell_types + 0 }, - { "ack_configure", "u", xdg_shell_types + 0 }, + { "destroy", "", types + 0 }, + { "get_toplevel", "n", types + 7 }, + { "get_popup", "n?oo", types + 8 }, + { "set_window_geometry", "iiii", types + 0 }, + { "ack_configure", "u", types + 0 }, }; static const struct wl_message xdg_surface_events[] = { - { "configure", "u", xdg_shell_types + 0 }, + { "configure", "u", types + 0 }, }; WL_PRIVATE const struct wl_interface xdg_surface_interface = { - "xdg_surface", 3, + "xdg_surface", 6, 5, xdg_surface_requests, 1, xdg_surface_events, }; static const struct wl_message xdg_toplevel_requests[] = { - { "destroy", "", xdg_shell_types + 0 }, - { "set_parent", "?o", xdg_shell_types + 11 }, - { "set_title", "s", xdg_shell_types + 0 }, - { "set_app_id", "s", xdg_shell_types + 0 }, - { "show_window_menu", "ouii", xdg_shell_types + 12 }, - { "move", "ou", xdg_shell_types + 16 }, - { "resize", "ouu", xdg_shell_types + 18 }, - { "set_max_size", "ii", xdg_shell_types + 0 }, - { "set_min_size", "ii", xdg_shell_types + 0 }, - { "set_maximized", "", xdg_shell_types + 0 }, - { "unset_maximized", "", xdg_shell_types + 0 }, - { "set_fullscreen", "?o", xdg_shell_types + 21 }, - { "unset_fullscreen", "", xdg_shell_types + 0 }, - { "set_minimized", "", xdg_shell_types + 0 }, + { "destroy", "", types + 0 }, + { "set_parent", "?o", types + 11 }, + { "set_title", "s", types + 0 }, + { "set_app_id", "s", types + 0 }, + { "show_window_menu", "ouii", types + 12 }, + { "move", "ou", types + 16 }, + { "resize", "ouu", types + 18 }, + { "set_max_size", "ii", types + 0 }, + { "set_min_size", "ii", types + 0 }, + { "set_maximized", "", types + 0 }, + { "unset_maximized", "", types + 0 }, + { "set_fullscreen", "?o", types + 21 }, + { "unset_fullscreen", "", types + 0 }, + { "set_minimized", "", types + 0 }, }; static const struct wl_message xdg_toplevel_events[] = { - { "configure", "iia", xdg_shell_types + 0 }, - { "close", "", xdg_shell_types + 0 }, + { "configure", "iia", types + 0 }, + { "close", "", types + 0 }, + { "configure_bounds", "4ii", types + 0 }, + { "wm_capabilities", "5a", types + 0 }, }; WL_PRIVATE const struct wl_interface xdg_toplevel_interface = { - "xdg_toplevel", 3, + "xdg_toplevel", 6, 14, xdg_toplevel_requests, - 2, xdg_toplevel_events, + 4, xdg_toplevel_events, }; static const struct wl_message xdg_popup_requests[] = { - { "destroy", "", xdg_shell_types + 0 }, - { "grab", "ou", xdg_shell_types + 22 }, - { "reposition", "3ou", xdg_shell_types + 24 }, + { "destroy", "", types + 0 }, + { "grab", "ou", types + 22 }, + { "reposition", "3ou", types + 24 }, }; static const struct wl_message xdg_popup_events[] = { - { "configure", "iiii", xdg_shell_types + 0 }, - { "popup_done", "", xdg_shell_types + 0 }, - { "repositioned", "3u", xdg_shell_types + 0 }, + { "configure", "iiii", types + 0 }, + { "popup_done", "", types + 0 }, + { "repositioned", "3u", types + 0 }, }; WL_PRIVATE const struct wl_interface xdg_popup_interface = { - "xdg_popup", 3, + "xdg_popup", 6, 3, xdg_popup_requests, 3, xdg_popup_events, };