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;