From 5517953ed01f38a7eb8506ba7b48252a83e44bb2 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 21 Sep 2022 14:15:30 -0500 Subject: [PATCH] xwm: Check size hints in weston_wm_window_is_positioned() Currently we can't tell the difference between a window intentionally created at 0,0 and a window that we can place anywhere. Check the size hints to see if the flags indicating the placement is intentional are present. Signed-off-by: Derek Foreman (cherry picked from commit 1cb46994e3808e8000300ed9ae9dcaa0b76bff28) --- xwayland/window-manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index f0655a7f..9dc30e1c 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -2937,6 +2937,9 @@ weston_wm_window_is_positioned(struct weston_wm_window *window) weston_log("XWM warning: win %d did not see map request\n", window->id); + if (window->size_hints.flags & (USPosition | PPosition)) + return true; + return window->map_request_x != 0 || window->map_request_y != 0; }