diff options
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r-- | sway/desktop/xdg_shell.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 667fb9e5..cbf16662 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -295,17 +295,20 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
295 | if (new_size) { | 295 | if (new_size) { |
296 | // The view has unexpectedly sent a new size | 296 | // The view has unexpectedly sent a new size |
297 | desktop_damage_view(view); | 297 | desktop_damage_view(view); |
298 | view_update_size(view, new_geo.width, new_geo.height); | ||
299 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 298 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
299 | if (container_is_floating(view->container)) { | ||
300 | view_update_size(view, new_geo.width, new_geo.height); | ||
301 | transaction_commit_dirty(); | ||
302 | transaction_notify_view_ready_immediately(view); | ||
303 | } else { | ||
304 | view_center_surface(view); | ||
305 | } | ||
300 | desktop_damage_view(view); | 306 | desktop_damage_view(view); |
301 | transaction_commit_dirty(); | ||
302 | } | 307 | } |
303 | 308 | ||
304 | if (view->container->node.instruction) { | 309 | if (view->container->node.instruction) { |
305 | transaction_notify_view_ready_by_serial(view, | 310 | transaction_notify_view_ready_by_serial(view, |
306 | xdg_surface->configure_serial); | 311 | xdg_surface->configure_serial); |
307 | } else if (new_size) { | ||
308 | transaction_notify_view_ready_immediately(view); | ||
309 | } | 312 | } |
310 | 313 | ||
311 | view_damage_from(view); | 314 | view_damage_from(view); |