]> git.mdlowis.com Git - proto/labwc.git/commitdiff
xwayland-shell: center view on first map
authorJohan Malm <jgm323@gmail.com>
Fri, 9 Jul 2021 20:45:38 +0000 (21:45 +0100)
committerJohan Malm <jgm323@gmail.com>
Fri, 9 Jul 2021 20:45:38 +0000 (21:45 +0100)
src/xwayland.c

index 185208727fef54f8005b6addd75d28cfb4c4a7fe..90f3ba6125f373ca72e468f791aa503f259ebacd 100644 (file)
@@ -157,6 +157,11 @@ map(struct view *view)
                ssd_create(view);
        }
 
+       if (!view->been_mapped) {
+               view_center(view);
+               view->been_mapped = true;
+       }
+
        top_left_edge_boundary_check(view);
 
        /* Add commit here, as xwayland map/unmap can change the wlr_surface */