mirror of
https://github.com/wizbright/waybox.git
synced 2025-10-31 22:25:28 -04:00
Backported changes to tinywl
This commit is contained in:
parent
9fa7060dd4
commit
18950eb844
10 changed files with 288 additions and 30 deletions
|
|
@ -76,14 +76,22 @@ void new_output_notify(struct wl_listener *listener, void *data) {
|
|||
|
||||
/* Set the background color */
|
||||
float color[4] = {0.1875, 0.1875, 0.1875, 1.0};
|
||||
#if WLR_CHECK_VERSION(0, 16, 0)
|
||||
output->background = wlr_scene_rect_create(&server->scene->tree, 0, 0, color);
|
||||
#else
|
||||
output->background = wlr_scene_rect_create(&server->scene->node, 0, 0, color);
|
||||
#endif
|
||||
wlr_scene_node_lower_to_bottom(&output->background->node);
|
||||
|
||||
/* Initializes the layers */
|
||||
size_t num_layers = sizeof(output->layers) / sizeof(struct wlr_scene_node *);
|
||||
for (size_t i = 0; i < num_layers; i++) {
|
||||
((struct wlr_scene_node **) &output->layers)[i] =
|
||||
#if WLR_CHECK_VERSION(0, 16, 0)
|
||||
&wlr_scene_tree_create(&server->scene->tree)->node;
|
||||
#else
|
||||
&wlr_scene_tree_create(&server->scene->node)->node;
|
||||
#endif
|
||||
}
|
||||
|
||||
wl_list_insert(&server->outputs, &output->link);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue