Add focus history and Alt-Tab window switching
This commit is contained in:
1 parent
a3431cab5b
commit
0162870cca
18 files changed
+571
-8
No files matched your search
@@ -59,6 +59,16 @@ impl SeatHandler for Ferese {
|
||||
}
|
||||
|
||||
fn focus_changed(&mut self, seat: &Seat<Self>, focused: Option<&WlSurface>) {
|
||||
if let Some(id) = focused.and_then(|surface| {
|
||||
self.window_ids.iter().find_map(|(window, id)| {
|
||||
window
|
||||
.toplevel()
|
||||
.is_some_and(|toplevel| toplevel.wl_surface() == surface)
|
||||
.then_some(*id)
|
||||
})
|
||||
}) {
|
||||
self.focus_history.record(id);
|
||||
}
|
||||
if let Some(inhibitor) = self.active_shortcuts_inhibitor.take()
|
||||
&& inhibitor.is_active()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user