fix(input): require mapped layers for keyboard focus (#48)

Co-authored-by: Samuel Onoja <[email protected]>
This commit is contained in:
Samuel OnojaandSamuel Onoja authored and GitHub committed 2026-10-14 13:28:33 +01:00
1 parent 0589f5685b
commit d73d5f08f9
5 files changed
+357 -16

No files matched your search

+8 -4
View File
@@ -713,10 +713,14 @@ impl Ferese {
return;
}
let surface = self
.focused_window
.and_then(|focused| self.windows.window(focused))
.and_then(|window| window.toplevel())
.map(|toplevel| toplevel.wl_surface().clone());
.exclusive_keyboard_layer()
.map(|layer| layer.wl_surface().clone())
.or_else(|| {
self.focused_window
.and_then(|focused| self.windows.window(focused))
.and_then(|window| window.toplevel())
.map(|toplevel| toplevel.wl_surface().clone())
});
self.seat.get_keyboard().expect("seat has a keyboard").set_focus(
self,