aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorKirill Primak <vyivel@posteo.net>2021-07-29 23:03:14 +0300
committerKirill Primak <vyivel@posteo.net>2021-09-30 23:17:32 +0300
commitdb4afc240820b541bc433b76840633d2170817b9 (patch)
tree67be93df8caf2bf821800075c5af000f247cf4aa /include/wlr
parent3d0848daae40a8a471282431eac8310e5d051d33 (diff)
xdg-surface: add pending state
struct wlr_xdg_surface_state is introduced to hold the geometry and configure serial to be applied on next wl_surface.commit. This commit fixes our handling for ack_configure: instead of making the request mutate our current state, it mutates the pending state only. Co-authored-by: Simon Ser <contact@emersion.fr>
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_xdg_shell.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h
index 2ca7e203..c214769a 100644
--- a/include/wlr/types/wlr_xdg_shell.h
+++ b/include/wlr/types/wlr_xdg_shell.h
@@ -161,6 +161,11 @@ struct wlr_xdg_surface_configure {
struct wlr_xdg_toplevel_configure *toplevel_configure;
};
+struct wlr_xdg_surface_state {
+ uint32_t configure_serial;
+ struct wlr_box geometry;
+};
+
/**
* An xdg-surface is a user interface element requiring management by the
* compositor. An xdg-surface alone isn't useful, a role should be assigned to
@@ -191,10 +196,10 @@ struct wlr_xdg_surface {
uint32_t configure_next_serial;
struct wl_list configure_list;
- bool has_next_geometry;
- struct wlr_box next_geometry;
struct wlr_box geometry;
+ struct wlr_xdg_surface_state pending;
+
struct wl_listener surface_destroy;
struct wl_listener surface_commit;