mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-23 06:59:44 -05:00
xdg-shell: don't populate current state on ack_configure
The xdg_surface.ack_configure request is double-buffered state. We shouldn't apply it immediately, we should wait for the surface commit to be applied.
This commit is contained in:
parent
9c3163df7a
commit
8e91913452
2 changed files with 3 additions and 1 deletions
|
|
@ -150,6 +150,7 @@ struct wlr_xdg_surface_configure {
|
|||
};
|
||||
|
||||
struct wlr_xdg_surface_state {
|
||||
uint32_t configure_serial;
|
||||
bool has_geometry;
|
||||
struct wlr_box geometry;
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ static void xdg_surface_handle_ack_configure(struct wl_client *client,
|
|||
}
|
||||
|
||||
surface->configured = true;
|
||||
surface->configure_serial = serial;
|
||||
surface->pending.configure_serial = serial;
|
||||
|
||||
wlr_signal_emit_safe(&surface->events.ack_configure, configure);
|
||||
xdg_surface_configure_destroy(configure);
|
||||
|
|
@ -401,6 +401,7 @@ void handle_xdg_surface_commit(struct wlr_surface *wlr_surface) {
|
|||
return;
|
||||
}
|
||||
|
||||
surface->configure_serial = next.configure_serial;
|
||||
if (next.has_geometry) {
|
||||
surface->geometry = next.geometry;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue