xdg-shell,layer-shell: improve init state tracking

Instead of updating the initialized flag when the state is applied,
update it when the client performs a surface commit. This is more
correct and will be relevant if/when surface transactions are
implemented.
This commit is contained in:
Kirill Primak 2024-08-05 20:13:49 +03:00
parent 6f6268988b
commit 1ed0b26631
6 changed files with 44 additions and 26 deletions

View file

@ -249,8 +249,6 @@ struct wlr_surface {
int buffer_width, buffer_height;
} previous;
bool unmap_commit;
bool opaque;
bool handling_commit;

View file

@ -70,6 +70,10 @@ struct wlr_layer_surface_v1_state {
uint32_t configure_serial;
uint32_t actual_width, actual_height;
struct {
bool initial_commit;
} WLR_PRIVATE;
};
struct wlr_layer_surface_v1_configure {
@ -118,6 +122,8 @@ struct wlr_layer_surface_v1 {
struct {
struct wlr_surface_synced synced;
bool client_mapped;
} WLR_PRIVATE;
};

View file

@ -256,6 +256,10 @@ struct wlr_xdg_surface_state {
struct wlr_box geometry;
uint32_t configure_serial;
struct {
bool initial_commit;
} WLR_PRIVATE;
};
/**
@ -317,6 +321,8 @@ struct wlr_xdg_surface {
struct wlr_surface_synced synced;
struct wl_listener role_resource_destroy;
bool client_mapped;
} WLR_PRIVATE;
};