From 508df093c4c499f3159da04e88228b15a3c7ae49 Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Wed, 6 Aug 2025 00:30:54 -0400 Subject: [PATCH] xdg: try to keep view on the same output in timeout case --- src/xdg.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/xdg.c b/src/xdg.c index d71a7d93..e54fdea0 100644 --- a/src/xdg.c +++ b/src/xdg.c @@ -322,6 +322,13 @@ handle_configure_timeout(void *data) wlr_log(WLR_INFO, "using fallback position"); view->pending.x = VIEW_FALLBACK_X; view->pending.y = VIEW_FALLBACK_Y; + /* At least try to keep it on the same output */ + if (output_is_usable(view->output)) { + struct wlr_box box = + output_usable_area_in_layout_coords(view->output); + view->pending.x += box.x; + view->pending.y += box.y; + } } view->current.x = view->pending.x; view->current.y = view->pending.y; -- 2.52.0