From f39986a3e298e61ac31103f4c947ac54d8b63083 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Sun, 26 Feb 2023 20:25:05 -0500 Subject: [PATCH] xdg: Fix visual glitch when resizing xfce4-terminal from left edge --- src/xdg.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/xdg.c b/src/xdg.c index aaf54457..87d72ff9 100644 --- a/src/xdg.c +++ b/src/xdg.c @@ -217,9 +217,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); } }