From dc090aa517db6aaae991bd4fbcb4712507c0bb3f Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Sun, 23 Feb 2020 22:32:29 +0100 Subject: [PATCH] output: add usable area This area will be defined by the layer shell surfaces, as the total output layout area minus areas occupied by layer shell surfaces. It is meant for layer shell surfaces to reserve space that will not be used for views, such as a status bar. --- output.c | 2 ++ output.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/output.c b/output.c index e937bc7..ad872dc 100644 --- a/output.c +++ b/output.c @@ -56,6 +56,8 @@ output_enable(struct cg_output *output) wlr_output_enable(wlr_output, true); wlr_output_commit(wlr_output); + output->usable_area = *wlr_output_layout_get_box(output->server->output_layout, wlr_output); + struct wlr_scene_output *scene_output; wl_list_for_each (scene_output, &output->server->scene->outputs, link) { if (scene_output->output == wlr_output) { diff --git a/output.h b/output.h index ffd349c..9aaf0cf 100644 --- a/output.h +++ b/output.h @@ -4,6 +4,7 @@ #include #include #include +#include #include "server.h" #include "view.h" @@ -20,6 +21,7 @@ struct cg_output { struct cg_server *server; struct wlr_output *wlr_output; struct wlr_scene_output *scene_output; + struct wlr_box usable_area; struct wl_listener commit; struct wl_listener mode;