From dc3b6a930311ab4dea9d18a7340db6c8d7cf2be6 Mon Sep 17 00:00:00 2001 From: tiosgz Date: Sat, 11 Sep 2021 18:56:43 +0000 Subject: [PATCH] Fix getting view position view->geom.{x,y} tell the compositor where to place the buffer relatively to the view, view->{x,y} is the view's absolute position. --- kiwmi/desktop/desktop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kiwmi/desktop/desktop.c b/kiwmi/desktop/desktop.c index add373e..d6dee0b 100644 --- a/kiwmi/desktop/desktop.c +++ b/kiwmi/desktop/desktop.c @@ -105,8 +105,8 @@ desktop_active_output(struct kiwmi_server *server) break; // get first element of list } - double lx = view->geom.x + view->geom.width / 2; - double ly = view->geom.y + view->geom.height / 2; + double lx = view->x + view->geom.width / 2; + double ly = view->y + view->geom.height / 2; struct wlr_output *wlr_output = wlr_output_layout_output_at(server->desktop.output_layout, lx, ly);