forked from mirror/dwl
use scene to keep track of LayerSurfaces' layers
This commit is contained in:
parent
1b38801eef
commit
be6f573b4e
1 changed files with 2 additions and 5 deletions
7
dwl.c
7
dwl.c
|
@ -156,7 +156,6 @@ typedef struct {
|
||||||
struct wl_listener surface_commit;
|
struct wl_listener surface_commit;
|
||||||
|
|
||||||
struct wlr_box geo;
|
struct wlr_box geo;
|
||||||
enum zwlr_layer_shell_v1_layer layer;
|
|
||||||
} LayerSurface;
|
} LayerSurface;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -764,16 +763,14 @@ commitlayersurfacenotify(struct wl_listener *listener, void *data)
|
||||||
|
|
||||||
if (!wlr_output)
|
if (!wlr_output)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m = wlr_output->data;
|
m = wlr_output->data;
|
||||||
arrangelayers(m);
|
|
||||||
|
|
||||||
if (layersurface->layer != wlr_layer_surface->current.layer) {
|
if (layers[wlr_layer_surface->current.layer] != layersurface->scene) {
|
||||||
wl_list_remove(&layersurface->link);
|
wl_list_remove(&layersurface->link);
|
||||||
wl_list_insert(&m->layers[wlr_layer_surface->current.layer],
|
wl_list_insert(&m->layers[wlr_layer_surface->current.layer],
|
||||||
&layersurface->link);
|
&layersurface->link);
|
||||||
layersurface->layer = wlr_layer_surface->current.layer;
|
|
||||||
}
|
}
|
||||||
|
arrangelayers(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue