From c3e54021f8bbf3ec1c1e5906459be0ae85f5fb8c Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Thu, 30 Sep 2021 20:46:08 +0300 Subject: xdg-decoration: refactor configure/state flow The same logic/motivation as xdg-toplevel. --- include/wlr/types/wlr_xdg_decoration_v1.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/wlr/types/wlr_xdg_decoration_v1.h b/include/wlr/types/wlr_xdg_decoration_v1.h index eafa05cc..b3651559 100644 --- a/include/wlr/types/wlr_xdg_decoration_v1.h +++ b/include/wlr/types/wlr_xdg_decoration_v1.h @@ -30,16 +30,22 @@ struct wlr_xdg_toplevel_decoration_v1_configure { enum wlr_xdg_toplevel_decoration_v1_mode mode; }; +struct wlr_xdg_toplevel_decoration_v1_state { + enum wlr_xdg_toplevel_decoration_v1_mode mode; +}; + struct wlr_xdg_toplevel_decoration_v1 { struct wl_resource *resource; struct wlr_xdg_surface *surface; struct wlr_xdg_decoration_manager_v1 *manager; struct wl_list link; // wlr_xdg_decoration_manager_v1::link + struct wlr_xdg_toplevel_decoration_v1_state current, pending; + + enum wlr_xdg_toplevel_decoration_v1_mode scheduled_mode; + enum wlr_xdg_toplevel_decoration_v1_mode requested_mode; + bool added; - enum wlr_xdg_toplevel_decoration_v1_mode current_mode; - enum wlr_xdg_toplevel_decoration_v1_mode client_pending_mode; - enum wlr_xdg_toplevel_decoration_v1_mode server_pending_mode; struct wl_list configure_list; // wlr_xdg_toplevel_decoration_v1_configure::link -- cgit v1.2.3