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 <derek.foreman@collabora.com>
(cherry picked from commit 1cb46994e3)
This commit is contained in:
Derek Foreman 2022-09-21 14:15:30 -05:00 committed by Marius Vlad
parent 00a78294b1
commit 5517953ed0
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}