Compare commits

..

1 Commits

Author SHA1 Message Date
nevaforget de97d6658e fix: grab keyboard focus on map instead of realize (v0.7.4)
Update PKGBUILD version / update-pkgver (push) Successful in 3s
Layer-shell keyboard grab is only confirmed by the compositor at map
time. The previous realize-time grab_focus() could fire before the
compositor assigned keyboard input, causing intermittent input loss.
2026-04-06 22:29:37 +02:00
3 changed files with 14 additions and 2 deletions
Generated
+1 -1
View File
@@ -575,7 +575,7 @@ dependencies = [
[[package]]
name = "moongreet"
version = "0.7.1"
version = "0.7.4"
dependencies = [
"gdk-pixbuf",
"gdk4",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "moongreet"
version = "0.7.3"
version = "0.7.4"
edition = "2024"
description = "A greetd greeter for Wayland with GTK4 and Layer Shell"
license = "MIT"
+12
View File
@@ -553,6 +553,18 @@ pub fn create_greeter_window(
));
window.add_controller(key_controller);
// Grab keyboard focus after map — layer-shell keyboard grab is only
// confirmed by the compositor at map time, not at realize time.
window.connect_map(clone!(
#[weak]
password_entry,
move |_| {
glib::idle_add_local_once(move || {
password_entry.grab_focus();
});
}
));
// Defer initial user selection until realized (for correct theme colors)
window.connect_realize(clone!(
#[strong]