aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKirill Primak <vyivel@posteo.net>2021-09-18 11:32:23 +0300
committerIsaac Freund <ifreund@ifreund.xyz>2021-09-23 21:22:41 +0200
commit59fa3637c348270cd1adb239296be1219538394b (patch)
tree02a8a2158cf5e28ccb610a3a68eea29267d10299 /include
parent3c26244340fe09fb99368a1c2326335db86fbf5f (diff)
layer-shell: refactor configure/state flow
Same logic as xdg-toplevel.
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_layer_shell_v1.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/wlr/types/wlr_layer_shell_v1.h b/include/wlr/types/wlr_layer_shell_v1.h
index 6f951556..3fa7d6de 100644
--- a/include/wlr/types/wlr_layer_shell_v1.h
+++ b/include/wlr/types/wlr_layer_shell_v1.h
@@ -53,12 +53,14 @@ struct wlr_layer_surface_v1_state {
uint32_t desired_width, desired_height;
uint32_t actual_width, actual_height;
enum zwlr_layer_shell_v1_layer layer;
+ uint32_t configure_serial;
};
struct wlr_layer_surface_v1_configure {
struct wl_list link; // wlr_layer_surface_v1::configure_list
uint32_t serial;
- struct wlr_layer_surface_v1_state state;
+
+ uint32_t width, height;
};
struct wlr_layer_surface_v1 {
@@ -71,15 +73,9 @@ struct wlr_layer_surface_v1 {
char *namespace;
bool added, configured, mapped;
- uint32_t configure_serial;
- uint32_t configure_next_serial;
struct wl_list configure_list;
- struct wlr_layer_surface_v1_configure *acked_configure;
-
- struct wlr_layer_surface_v1_state client_pending;
- struct wlr_layer_surface_v1_state server_pending;
- struct wlr_layer_surface_v1_state current;
+ struct wlr_layer_surface_v1_state current, pending;
struct wl_listener surface_destroy;
@@ -119,9 +115,9 @@ struct wlr_layer_shell_v1 *wlr_layer_shell_v1_create(struct wl_display *display)
/**
* Notifies the layer surface to configure itself with this width/height. The
* layer_surface will signal its map event when the surface is ready to assume
- * this size.
+ * this size. Returns the associated configure serial.
*/
-void wlr_layer_surface_v1_configure(struct wlr_layer_surface_v1 *surface,
+uint32_t wlr_layer_surface_v1_configure(struct wlr_layer_surface_v1 *surface,
uint32_t width, uint32_t height);
/**