mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
layers.h: define LAB_NR_LAYERS (4)
This commit is contained in:
parent
6488b933fa
commit
f26b61137d
3 changed files with 5 additions and 2 deletions
|
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
struct server;
|
struct server;
|
||||||
|
|
||||||
|
#define LAB_NR_LAYERS (4)
|
||||||
|
|
||||||
enum layer_parent {
|
enum layer_parent {
|
||||||
LAYER_PARENT_LAYER,
|
LAYER_PARENT_LAYER,
|
||||||
LAYER_PARENT_POPUP,
|
LAYER_PARENT_POPUP,
|
||||||
|
|
@ -29,6 +31,7 @@ struct lab_layer_surface {
|
||||||
struct server *server;
|
struct server *server;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* FIXME: do we still need lab_layer_popup and lab_layer_subsurface? */
|
||||||
struct lab_layer_popup {
|
struct lab_layer_popup {
|
||||||
struct wlr_xdg_popup *wlr_popup;
|
struct wlr_xdg_popup *wlr_popup;
|
||||||
enum layer_parent parent_type;
|
enum layer_parent parent_type;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ arrange_layers(struct output *output)
|
||||||
&full_area.width, &full_area.height);
|
&full_area.width, &full_area.height);
|
||||||
struct wlr_box usable_area = full_area;
|
struct wlr_box usable_area = full_area;
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < LAB_NR_LAYERS; i++) {
|
||||||
struct lab_layer_surface *lab_layer_surface;
|
struct lab_layer_surface *lab_layer_surface;
|
||||||
wl_list_for_each(lab_layer_surface, &output->layers[i], link) {
|
wl_list_for_each(lab_layer_surface, &output->layers[i], link) {
|
||||||
struct wlr_scene_layer_surface_v1 *scene_layer_surface =
|
struct wlr_scene_layer_surface_v1 *scene_layer_surface =
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ new_output_notify(struct wl_listener *listener, void *data)
|
||||||
output->frame.notify = output_frame_notify;
|
output->frame.notify = output_frame_notify;
|
||||||
wl_signal_add(&wlr_output->events.frame, &output->frame);
|
wl_signal_add(&wlr_output->events.frame, &output->frame);
|
||||||
|
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < LAB_NR_LAYERS; i++) {
|
||||||
wl_list_init(&output->layers[i]);
|
wl_list_init(&output->layers[i]);
|
||||||
output->layer_tree[i] =
|
output->layer_tree[i] =
|
||||||
wlr_scene_tree_create(&server->scene->node);
|
wlr_scene_tree_create(&server->scene->node);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue