mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
xdg-shell: add support for cached xdg_surface state
When the pending surface state becomes cached, also cache the pending xdg_surface state. When a cached surface state becomes current, also make the matching cached xdg_surface state current. References: https://github.com/swaywm/wlroots/issues/2957
This commit is contained in:
parent
0f9ecac3cb
commit
9c3163df7a
2 changed files with 84 additions and 15 deletions
|
|
@ -149,6 +149,14 @@ struct wlr_xdg_surface_configure {
|
|||
struct wlr_xdg_toplevel_state *toplevel_state;
|
||||
};
|
||||
|
||||
struct wlr_xdg_surface_state {
|
||||
bool has_geometry;
|
||||
struct wlr_box geometry;
|
||||
|
||||
uint32_t seq;
|
||||
struct wl_list cached_state_link;
|
||||
};
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
@ -179,12 +187,14 @@ 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_list cached;
|
||||
|
||||
struct wl_listener surface_destroy;
|
||||
struct wl_listener surface_commit;
|
||||
struct wl_listener surface_cache;
|
||||
|
||||
struct {
|
||||
struct wl_signal destroy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue