view: move view_moved() out of view_impl_apply_geometry()

This commit is contained in:
John Lindgren 2025-12-01 13:58:18 -05:00 committed by Hiroaki Yamamoto
parent 5ea617a393
commit 27aa8173f3
3 changed files with 2 additions and 5 deletions

View file

@ -65,7 +65,6 @@ view_impl_apply_geometry(struct view *view, int w, int h)
{ {
struct wlr_box *current = &view->current; struct wlr_box *current = &view->current;
struct wlr_box *pending = &view->pending; struct wlr_box *pending = &view->pending;
struct wlr_box old = *current;
/* /*
* Anchor right edge if resizing via left edge. * Anchor right edge if resizing via left edge.
@ -100,8 +99,4 @@ view_impl_apply_geometry(struct view *view, int w, int h)
current->width = w; current->width = w;
current->height = h; current->height = h;
if (!wlr_box_equal(current, &old)) {
view_moved(view);
}
} }

View file

@ -238,6 +238,7 @@ handle_commit(struct wl_listener *listener, void *data)
if (update_required) { if (update_required) {
view_impl_apply_geometry(view, size.width, size.height); view_impl_apply_geometry(view, size.width, size.height);
view_moved(view);
/* /*
* Some views (e.g., terminals that scale as multiples of rows * Some views (e.g., terminals that scale as multiples of rows

View file

@ -274,6 +274,7 @@ handle_commit(struct wl_listener *listener, void *data)
*/ */
if (current->width != state->width || current->height != state->height) { if (current->width != state->width || current->height != state->height) {
view_impl_apply_geometry(view, state->width, state->height); view_impl_apply_geometry(view, state->width, state->height);
view_moved(view);
} }
} }