mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
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>
This commit is contained in:
parent
3d0848daae
commit
db4afc2408
2 changed files with 22 additions and 18 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue