diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2014-05-12 23:30:28 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-05-12 23:34:34 -0700 |
commit | be803ad67cf84cd6997155b0283fbb474747e7a2 (patch) | |
tree | c1d113ab06aaac180f1ae8eed92e59ea60b5d819 | |
parent | f184c382e89ec71b1b9988a60918110e3fced94e (diff) |
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.
-rw-r--r-- | clients/window.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/clients/window.c b/clients/window.c index 4ff6a5a9..7b77f93a 100644 --- a/clients/window.c +++ b/clients/window.c @@ -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); |