]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xdg: Fix visual glitch when resizing xfce4-terminal from left edge
authorJohn Lindgren <john@jlindgren.net>
Mon, 27 Feb 2023 01:25:05 +0000 (20:25 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 5 Mar 2023 08:46:55 +0000 (08:46 +0000)
src/xdg.c

index 6ab3a46373424af941e46b4cb7129d284ea14838..cadf9d336c8f99169befd8d419682bef18c27815 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -233,9 +233,16 @@ xdg_toplevel_view_configure(struct view *view, struct wlr_box geo)
        if (serial > 0) {
                view->pending_configure_serial = serial;
        } else if (view->pending_configure_serial == 0) {
-               view->current.x = geo.x;
-               view->current.y = geo.y;
-               view_moved(view);
+               /*
+                * We can't assume here that view->current is equal to
+                * view->pending because some clients (e.g. terminals)
+                * refuse to accept the exact size we requested. To
+                * account for the size difference and avoid visual
+                * glitches during resize, we apply the same position
+                * adjustments here as in handle_commit().
+                */
+               view_impl_apply_geometry(view, view->current.width,
+                       view->current.height);
        }
 }