xdg_shell: remember size supplied by surface

When surface does not comply with supplied size,
sway centers it in container but do not remember new size and tries
to reconfigure it after any event (e.g. focus change)
This commit is contained in:
Versus Void 2019-10-17 15:05:33 +03:00
parent 3ee3a9ef60
commit 5347884c90

View file

@ -290,6 +290,7 @@ static void handle_commit(struct wl_listener *listener, void *data) {
desktop_damage_view(view); desktop_damage_view(view);
view_update_size(view, new_geo.width, new_geo.height); view_update_size(view, new_geo.width, new_geo.height);
memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box));
wlr_xdg_toplevel_set_size(xdg_surface, new_geo.width, new_geo.height);
desktop_damage_view(view); desktop_damage_view(view);
transaction_commit_dirty(); transaction_commit_dirty();
} else { } else {