From a651c89c8540eddfe0351599a5b3b930fc08cdf5 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 6 Feb 2024 09:24:31 +0100 Subject: Fix window moving in Fl_Wayland_Window_Driver::resize() --- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 5979ce0d9..35c76e017 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1847,6 +1847,9 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { int is_a_resize = (W != w() || H != h() || true_rescale); if (is_a_move) force_position(1); else if (!is_a_resize && !is_a_move) return; + if (shown() && !(parent() || popup_window())) { + X = Y = 0; + } if (is_a_resize) { if (pWindow->parent()) { if (W < 1) W = 1; @@ -1857,7 +1860,7 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) { if (shown()) {pWindow->redraw();} } else { x(X); y(Y); -//fprintf(stderr, "move menuwin=%p x()=%d\n", pWindow, X); +//fprintf(stderr, "move win=%p to %dx%d\n", pWindow, X, Y); } if (shown()) { -- cgit v1.2.3