]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xdg: don't try to reposition unmapped view in timeout handler
authorJohn Lindgren <john@jlindgren.net>
Wed, 6 Aug 2025 04:23:40 +0000 (00:23 -0400)
committerHiroaki Yamamoto <hrak1529@gmail.com>
Wed, 6 Aug 2025 09:14:24 +0000 (18:14 +0900)
src/xdg.c

index 363bd478cee7d8c2e4574179680bad8b7cac6d11..d71a7d939523de2f7af772302706a14998d8fcdb 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -288,6 +288,14 @@ handle_configure_timeout(void *data)
        view->pending_configure_serial = 0;
        view->pending_configure_timeout = NULL;
 
+       /*
+        * No need to do anything else if the view is just being slow to
+        * map - the map handler will take care of the positioning.
+        */
+       if (!view->mapped) {
+               return 0; /* ignored per wl_event_loop docs */
+       }
+
        bool empty_pending = wlr_box_empty(&view->pending);
        if (empty_pending || view->pending.x != view->current.x
                        || view->pending.y != view->current.y) {