From 08429c5ba3b0b58e34e0de878f833ca949475cd1 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Fri, 9 Jul 2021 21:45:38 +0100 Subject: [PATCH] xwayland-shell: center view on first map --- src/xwayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xwayland.c b/src/xwayland.c index 18520872..90f3ba61 100644 --- a/src/xwayland.c +++ b/src/xwayland.c @@ -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 */