summaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorDima Krasner <dima@dimakrasner.com>2023-12-08 08:22:57 +0200
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-12-11 00:30:17 -0600
commit9a84789ff1ba5cac059e536d57a849917ab360b6 (patch)
tree447e2af9932bca075d1d9b6a83f80e260d4407a4 /dwl.c
parent49bfe927030b4747deded43656b4fe417c157123 (diff)
restore and respect rootcolor
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dwl.c b/dwl.c
index 8b58a86..73e0c54 100644
--- a/dwl.c
+++ b/dwl.c
@@ -361,6 +361,7 @@ static struct wlr_cursor_shape_manager_v1 *cursor_shape_mgr;
static struct wlr_cursor *cursor;
static struct wlr_xcursor_manager *cursor_mgr;
+static struct wlr_scene_rect *root_bg;
static struct wlr_session_lock_manager_v1 *session_lock_mgr;
static struct wlr_scene_rect *locked_bg;
static struct wlr_session_lock_v1 *cur_lock;
@@ -2181,6 +2182,7 @@ setup(void)
/* Initialize the scene graph used to lay out windows */
scene = wlr_scene_create();
+ root_bg = wlr_scene_rect_create(&scene->tree, 0, 0, rootcolor);
for (i = 0; i < NUM_LAYERS; i++)
layers[i] = wlr_scene_tree_create(&scene->tree);
drag_icon = wlr_scene_tree_create(&scene->tree);
@@ -2564,6 +2566,9 @@ updatemons(struct wl_listener *listener, void *data)
/* Now that we update the output layout we can get its box */
wlr_output_layout_get_box(output_layout, NULL, &sgeom);
+ wlr_scene_node_set_position(&root_bg->node, sgeom.x, sgeom.y);
+ wlr_scene_rect_set_size(root_bg, sgeom.width, sgeom.height);
+
/* Make sure the clients are hidden when dwl is locked */
wlr_scene_node_set_position(&locked_bg->node, sgeom.x, sgeom.y);
wlr_scene_rect_set_size(locked_bg, sgeom.width, sgeom.height);