mirror of
https://github.com/pinnacle-comp/pinnacle.git
synced 2025-01-14 08:01:14 +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
|
||||
self.pinnacle.loop_handle.insert_idle(move |state| {
|
||||
if let Some(keyboard) = state.pinnacle.seat.get_keyboard() {
|
||||
if new_window.is_on_active_tag() {
|
||||
keyboard.set_focus(
|
||||
state,
|
||||
Some(KeyboardFocusTarget::Window(new_window)),
|
||||
SERIAL_COUNTER.next_serial(),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue