shells: Resize on commit if geometry x/y changes

Client-side decorations lead to changes to y position, so make sure we
catch that.
This commit is contained in:
Kenny Levinsen 2020-06-03 14:51:29 +02:00 committed by Simon Ser
parent 5a4a7bc0da
commit f8dd7df1f5
2 changed files with 6 additions and 2 deletions

View file

@ -284,7 +284,9 @@ static void handle_commit(struct wl_listener *listener, void *data) {
wlr_xdg_surface_get_geometry(xdg_surface, &new_geo);
if ((new_geo.width != view->geometry.width ||
new_geo.height != view->geometry.height)) {
new_geo.height != view->geometry.height ||
new_geo.x != view->geometry.x ||
new_geo.y != view->geometry.y)) {
// The view has unexpectedly sent a new size
desktop_damage_view(view);
view_update_size(view, new_geo.width, new_geo.height);

View file

@ -373,7 +373,9 @@ static void handle_commit(struct wl_listener *listener, void *data) {
get_geometry(view, &new_geo);
if ((new_geo.width != view->geometry.width ||
new_geo.height != view->geometry.height)) {
new_geo.height != view->geometry.height ||
new_geo.x != view->geometry.x ||
new_geo.y != view->geometry.y)) {
// The view has unexpectedly sent a new size
// eg. The Firefox "Save As" dialog when downloading a file
desktop_damage_view(view);