chore: update smithay + switch to tracing

This commit is contained in:
Victoria Brekenfeld 2023-02-24 17:41:52 +01:00
parent 844ed552b9
commit 35de500c00
35 changed files with 622 additions and 754 deletions

View file

@ -12,6 +12,7 @@ use smithay::{
utils::{IsAlive, Serial, SERIAL_COUNTER},
};
use std::cell::RefCell;
use tracing::{debug, info};
use self::target::{KeyboardFocusTarget, WindowGroup};
@ -100,7 +101,7 @@ impl Shell {
if let Some(workspace) = state.common.shell.space_for_mut(mapped) {
let mut focus_stack = workspace.focus_stack.get_mut(active_seat);
if Some(mapped) != focus_stack.last() {
slog_scope::debug!("Focusing window: {:?}", mapped);
debug!(?mapped, "Focusing window.");
focus_stack.append(mapped);
// also remove popup grabs, if we are switching focus
if let Some(mut popup_grab) = active_seat
@ -202,7 +203,7 @@ impl Common {
{
continue; // Focus is valid
} else {
slog_scope::debug!("Wrong Window, focus fixup");
debug!("Wrong Window, focus fixup");
}
}
KeyboardFocusTarget::LayerSurface(layer) => {
@ -223,7 +224,7 @@ impl Common {
} // Focus is valid
};
} else {
slog_scope::debug!("Surface dead, focus fixup");
debug!("Surface dead, focus fixup");
}
} else {
continue;
@ -262,7 +263,7 @@ impl Common {
.map(KeyboardFocusTarget::from)
});
if let Some(keyboard) = seat.get_keyboard() {
slog_scope::info!("restoring focus to: {:?}", target.as_ref());
info!("Restoring focus to {:?}", target.as_ref());
keyboard.set_focus(state, target.clone(), SERIAL_COUNTER.next_serial());
ActiveFocus::set(&seat, target);
}