aboutsummaryrefslogtreecommitdiff
path: root/rootston/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/output.c')
-rw-r--r--rootston/output.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 42dbd972..502e72d2 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -144,8 +144,32 @@ static void render_xwayland_children(struct wlr_xwayland_surface *surface,
}
}
+static void render_decorations(struct roots_view *view,
+ struct roots_desktop *desktop, struct wlr_output *output) {
+ if (!view->decorated) {
+ return;
+ }
+ struct wlr_box deco_box;
+ view_get_deco_box(view, &deco_box);
+ double ox = deco_box.x;
+ double oy = deco_box.y;
+ wlr_output_layout_output_coords(desktop->layout, output, &ox, &oy);
+ ox *= output->scale;
+ oy *= output->scale;
+
+ float matrix[16];
+ wlr_output_get_box_matrix(output, ox, oy, deco_box.width,
+ deco_box.height, WL_OUTPUT_TRANSFORM_NORMAL, view->rotation,
+ &matrix);
+
+ float color[4] = { 0.2, 0.2, 0.2, 1 };
+ wlr_render_colored_quad(desktop->server->renderer, &color, &matrix);
+}
+
static void render_view(struct roots_view *view, struct roots_desktop *desktop,
struct wlr_output *wlr_output, struct timespec *when) {
+ render_decorations(view, desktop, wlr_output);
+
switch (view->type) {
case ROOTS_XDG_SHELL_V6_VIEW:
render_surface(view->wlr_surface, desktop, wlr_output, when,