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".
This commit is contained in:
tokyo4j 2024-07-21 17:09:17 +09:00 committed by John Lindgren
parent de38c771fc
commit 6687640665

View file

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