mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-27 19:58:08 +01:00
Set keyboard focus on open only if on active tag
This commit is contained in:
parent
4291fa47ab
commit
176f559360
1 changed files with 7 additions and 5 deletions
|
@ -196,11 +196,13 @@ impl CompositorHandler for State {
|
||||||
// the extra configure in that causes windows to map then resize
|
// the extra configure in that causes windows to map then resize
|
||||||
self.pinnacle.loop_handle.insert_idle(move |state| {
|
self.pinnacle.loop_handle.insert_idle(move |state| {
|
||||||
if let Some(keyboard) = state.pinnacle.seat.get_keyboard() {
|
if let Some(keyboard) = state.pinnacle.seat.get_keyboard() {
|
||||||
keyboard.set_focus(
|
if new_window.is_on_active_tag() {
|
||||||
state,
|
keyboard.set_focus(
|
||||||
Some(KeyboardFocusTarget::Window(new_window)),
|
state,
|
||||||
SERIAL_COUNTER.next_serial(),
|
Some(KeyboardFocusTarget::Window(new_window)),
|
||||||
)
|
SERIAL_COUNTER.next_serial(),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue