From 41832714758c003c557da30193c6b02a2afe54b2 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Sun, 21 Jan 2018 18:24:53 -0500 Subject: make it work with rotation --- rootston/output.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'rootston/output.c') diff --git a/rootston/output.c b/rootston/output.c index 3680beac..0e568a14 100644 --- a/rootston/output.c +++ b/rootston/output.c @@ -158,8 +158,14 @@ static void render_decorations(struct roots_view *view, } struct wlr_box deco_box; view_get_deco_box(view, &deco_box); - double ox = deco_box.x; - double oy = deco_box.y; + double sx = deco_box.x - view->x; + double sy = deco_box.y - view->y; + rotate_child_position(&sx, &sy, deco_box.width, deco_box.height, + view->wlr_surface->current->width, + view->wlr_surface->current->height, view->rotation); + double ox = sx + view->x; + double oy = sy + view->y; + wlr_output_layout_output_coords(desktop->layout, output, &ox, &oy); ox *= output->scale; oy *= output->scale; -- cgit v1.2.3