fix: wallpaper windows on Layer::Bottom to prevent greeter occlusion
Wallpaper-only windows for secondary monitors were on Layer::Top — same layer as the greeter window. Since they were created after the greeter, they occluded the login UI, leaving only the wallpaper visible.
This commit is contained in:
parent
96c94f030a
commit
4c9b436978
@ -23,9 +23,9 @@ fn load_css(display: &gdk::Display) {
|
||||
);
|
||||
}
|
||||
|
||||
fn setup_layer_shell(window: >k::ApplicationWindow, keyboard: bool) {
|
||||
fn setup_layer_shell(window: >k::ApplicationWindow, keyboard: bool, layer: gtk4_layer_shell::Layer) {
|
||||
window.init_layer_shell();
|
||||
window.set_layer(gtk4_layer_shell::Layer::Top);
|
||||
window.set_layer(layer);
|
||||
window.set_exclusive_zone(-1);
|
||||
if keyboard {
|
||||
window.set_keyboard_mode(gtk4_layer_shell::KeyboardMode::Exclusive);
|
||||
@ -60,7 +60,7 @@ fn activate(app: >k::Application) {
|
||||
// Main greeter window (login UI) — compositor picks focused monitor
|
||||
let greeter_window = greeter::create_greeter_window(&bg_path, &config, app);
|
||||
if use_layer_shell {
|
||||
setup_layer_shell(&greeter_window, true);
|
||||
setup_layer_shell(&greeter_window, true, gtk4_layer_shell::Layer::Top);
|
||||
}
|
||||
greeter_window.present();
|
||||
|
||||
@ -74,7 +74,7 @@ fn activate(app: >k::Application) {
|
||||
.and_then(|obj| obj.downcast::<gdk::Monitor>().ok())
|
||||
{
|
||||
let wallpaper = greeter::create_wallpaper_window(&bg_path, app);
|
||||
setup_layer_shell(&wallpaper, false);
|
||||
setup_layer_shell(&wallpaper, false, gtk4_layer_shell::Layer::Bottom);
|
||||
wallpaper.set_monitor(Some(&monitor));
|
||||
wallpaper.present();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user