]> git.mdlowis.com Git - proto/labwc.git/commitdiff
view: Call view_moved() immediately after map
authorJohn Lindgren <john@jlindgren.net>
Mon, 5 Sep 2022 02:47:54 +0000 (22:47 -0400)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 6 Sep 2022 11:39:22 +0000 (13:39 +0200)
At least for XWayland surfaces, handle_commit() is not always
called after map(), and as a result, the scene-graph node is never
positioned.

Not sure 100% if the same can occur with XDG surfaces, but the
extra view_moved() call should be harmless, so add it there too
for consistency.

src/xdg.c
src/xwayland.c

index c52c2084d254131595fcc4c45eb6e5ca8aa5b33d..e75ac138cc04040da9ebe0ca8c6eddfe1bd9d5c3 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -307,7 +307,7 @@ xdg_toplevel_view_map(struct view *view)
                        view_maximize(view, true);
                }
 
-               view_discover_output(view);
+               view_moved(view);
                view->been_mapped = true;
        }
 
index ca4646dc8f1d68371e5c3ced56e1906220cd7619..5bfacecef1770762db344f803b802ac659292b46 100644 (file)
@@ -340,7 +340,7 @@ map(struct view *view)
                        view_center(view);
                }
 
-               view_discover_output(view);
+               view_moved(view);
                view->been_mapped = true;
        }