mirror of
https://github.com/labwc/labwc.git
synced 2026-02-05 04:06:33 -05:00
view: move view_moved() out of view_impl_apply_geometry()
This commit is contained in:
parent
5ea617a393
commit
27aa8173f3
3 changed files with 2 additions and 5 deletions
|
|
@ -65,7 +65,6 @@ view_impl_apply_geometry(struct view *view, int w, int h)
|
|||
{
|
||||
struct wlr_box *current = &view->current;
|
||||
struct wlr_box *pending = &view->pending;
|
||||
struct wlr_box old = *current;
|
||||
|
||||
/*
|
||||
* 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->height = h;
|
||||
|
||||
if (!wlr_box_equal(current, &old)) {
|
||||
view_moved(view);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
|
||||
if (update_required) {
|
||||
view_impl_apply_geometry(view, size.width, size.height);
|
||||
view_moved(view);
|
||||
|
||||
/*
|
||||
* Some views (e.g., terminals that scale as multiples of rows
|
||||
|
|
|
|||
|
|
@ -274,6 +274,7 @@ handle_commit(struct wl_listener *listener, void *data)
|
|||
*/
|
||||
if (current->width != state->width || current->height != state->height) {
|
||||
view_impl_apply_geometry(view, state->width, state->height);
|
||||
view_moved(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue