aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-01-21 18:24:53 -0500
committerTony Crisci <tony@dubstepdish.com>2018-01-21 18:24:53 -0500
commit41832714758c003c557da30193c6b02a2afe54b2 (patch)
tree962cfcd132d57b0a711e3a74364a05d7dbb50ef0 /rootston/output.c
parentd13114520acef63f9293ff313b8a549bc81be30c (diff)
make it work with rotation
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c10
1 files changed, 8 insertions, 2 deletions
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;