diff options
-rw-r--r-- | sway/desktop/transaction.c | 7 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 7c5a9b8f..d2932c87 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c | |||
@@ -298,6 +298,13 @@ void transaction_commit(struct sway_transaction *transaction) { | |||
298 | instruction->state.view_width, | 298 | instruction->state.view_width, |
299 | instruction->state.view_height); | 299 | instruction->state.view_height); |
300 | ++transaction->num_waiting; | 300 | ++transaction->num_waiting; |
301 | |||
302 | // From here on we are rendering a saved buffer of the view, which | ||
303 | // means we can send a frame done event to make the client redraw it | ||
304 | // as soon as possible. Additionally, this is required if a view is | ||
305 | // mapping and its default geometry doesn't intersect an output. | ||
306 | struct timespec when; | ||
307 | wlr_surface_send_frame_done(con->sway_view->surface, &when); | ||
301 | } | 308 | } |
302 | list_add(con->instructions, instruction); | 309 | list_add(con->instructions, instruction); |
303 | } | 310 | } |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 023fb2a7..ad893248 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -269,10 +269,11 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
269 | wl_container_of(listener, xwayland_view, commit); | 269 | wl_container_of(listener, xwayland_view, commit); |
270 | struct sway_view *view = &xwayland_view->view; | 270 | struct sway_view *view = &xwayland_view->view; |
271 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | 271 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; |
272 | struct wlr_surface_state *surface_state = xsurface->surface->current; | ||
272 | 273 | ||
273 | if (view->swayc->instructions->length) { | 274 | if (view->swayc->instructions->length) { |
274 | transaction_notify_view_ready_by_size(view, | 275 | transaction_notify_view_ready_by_size(view, |
275 | xsurface->width, xsurface->height); | 276 | surface_state->width, surface_state->height); |
276 | } | 277 | } |
277 | view_damage_from(view); | 278 | view_damage_from(view); |
278 | } | 279 | } |