From e383c1f1db37c6d2de8f070603a89230f876bc80 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 6 May 2022 19:20:33 +0200 Subject: xdg-shell: add support for v4 This adds a configure_bounds event to let the client know of the preferred maximum window geometry size. --- include/wlr/types/wlr_xdg_shell.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 04463d2c..f6b3b362 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -137,10 +137,18 @@ struct wlr_xdg_toplevel_state { uint32_t min_width, min_height; }; +enum wlr_xdg_toplevel_configure_field { + WLR_XDG_TOPLEVEL_CONFIGURE_BOUNDS = 1 << 0, +}; + struct wlr_xdg_toplevel_configure { + uint32_t fields; // enum wlr_xdg_toplevel_configure_field bool maximized, fullscreen, resizing, activated; uint32_t tiled; // enum wlr_edges uint32_t width, height; + struct { + uint32_t width, height; + } bounds; }; struct wlr_xdg_toplevel_requested { @@ -376,6 +384,13 @@ uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_toplevel *toplevel, uint32_t wlr_xdg_toplevel_set_tiled(struct wlr_xdg_toplevel *toplevel, uint32_t tiled_edges); +/** + * Configure the recommended bounds for the client's window geometry size. + * Returns the associated configure serial. + */ +uint32_t wlr_xdg_toplevel_set_bounds(struct wlr_xdg_toplevel *toplevel, + int32_t width, int32_t height); + /** * Request that this toplevel closes. */ -- cgit v1.2.3