From 6687640665a7959ac0c153b1c23049c7bd10b7aa Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sun, 21 Jul 2024 17:09:17 +0900 Subject: [PATCH] xdg: fix error when launching windowed Chromium Chromium sends 2 commits before the commit with a buffer attached. We were just checking `wlr_box_empty(&view->pending)` to handle the cases where an initially maximized/fullscreen client is windowed, but that check was also returning true on the 2nd commit from Chromium, resulting in an error message: "view has empty geometry, not centering". --- src/xdg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xdg.c b/src/xdg.c index eb106141..b75f864f 100644 --- a/src/xdg.c +++ b/src/xdg.c @@ -149,7 +149,7 @@ handle_commit(struct wl_listener *listener, void *data) * the pending x/y is also unset and we still need to position * the window. */ - if (wlr_box_empty(&view->pending)) { + if (wlr_box_empty(&view->pending) && !wlr_box_empty(&size)) { view->pending.width = size.width; view->pending.height = size.height; do_late_positioning(view); -- 2.52.0