window: Send ack_configure immediately from configure handler
Once we've updated the window state and scheduled a resize, we know that the next frame we send to the compositor will match the configured state. This means we can just ack the configure immediately and not jump through hoops to try to do it from the redraw stage.
This commit is contained in:
parent
f184c382e8
commit
be803ad67c
|
@ -230,8 +230,6 @@ struct window {
|
|||
int fullscreen;
|
||||
int maximized;
|
||||
|
||||
int next_attach_serial;
|
||||
|
||||
enum preferred_format preferred_format;
|
||||
|
||||
window_key_handler_t key_handler;
|
||||
|
@ -1341,12 +1339,6 @@ surface_flush(struct surface *surface)
|
|||
surface->input_region = NULL;
|
||||
}
|
||||
|
||||
if (surface->window->next_attach_serial > 0) {
|
||||
xdg_surface_ack_configure(surface->window->xdg_surface,
|
||||
surface->window->next_attach_serial);
|
||||
surface->window->next_attach_serial = 0;
|
||||
}
|
||||
|
||||
surface->toysurface->swap(surface->toysurface,
|
||||
surface->buffer_transform, surface->buffer_scale,
|
||||
&surface->server_allocation);
|
||||
|
@ -3893,7 +3885,7 @@ handle_surface_configure(void *data, struct xdg_surface *xdg_surface,
|
|||
window->saved_allocation.height);
|
||||
}
|
||||
|
||||
window->next_attach_serial = serial;
|
||||
xdg_surface_ack_configure(window->xdg_surface, serial);
|
||||
|
||||
if (window->state_changed_handler)
|
||||
window->state_changed_handler(window, window->user_data);
|
||||
|
|
Loading…
Reference in New Issue