Anchor the wlr_layer_surface to all 4 edges

Attempt to fix a crash with wayland protocol error reported in
https://github.com/gergo-salyi/multibg-sway/issues/8
This commit is contained in:
Gergő Sályi 2024-09-30 21:09:04 +02:00
parent ea45c60ab1
commit b203a15222

View file

@ -11,7 +11,7 @@ use smithay_client_toolkit::{
shell::{
WaylandSurface,
wlr_layer::{
KeyboardInteractivity, Layer, LayerShell,
Anchor, KeyboardInteractivity, Layer, LayerShell,
LayerShellHandler, LayerSurface, LayerSurfaceConfigure,
},
},
@ -246,6 +246,9 @@ logical size: {}x{}",
Some(&output)
);
layer.set_anchor(
Anchor::TOP | Anchor::BOTTOM | Anchor::LEFT | Anchor::RIGHT
);
layer.set_exclusive_zone(-1); // Don't let the status bar push it around
layer.set_keyboard_interactivity(KeyboardInteractivity::None);