chore: drive and log the fullscreen toggle from the dev script

Adds a fullscreen step that runs the toggle action and a key:f11 step
that sends F11 through the Slint window, plus a debug log of the state
each toggle starts from. A scripted run could not reproduce F11 failing
to re-enter fullscreen on COSMIC, so the log is there for a manual run.
This commit is contained in:
Ansho Rei
2026-11-06 20:27:29 +01:00
parent 768ef0f919
commit 885ca01ff7
2 changed files with 9 additions and 0 deletions
+1
View File
@@ -786,6 +786,7 @@ impl App {
}
Action::ToggleFullscreen => {
let w = self.ui.window();
log::debug!("F11: fullscreen {} size {:?}", w.is_fullscreen(), w.size());
w.set_fullscreen(!w.is_fullscreen());
return;
}
+8
View File
@@ -56,6 +56,13 @@ fn step(ui: slint::Weak<AppWindow>, steps: Vec<String>, i: usize) {
Err(e) => log::error!("snapshot failed: {e}"),
}
}
Some(("key", "f11")) => {
use slint::platform::{Key, WindowEvent};
let text: slint::SharedString = Key::F11.into();
win.window()
.dispatch_event(WindowEvent::KeyPressed { text: text.clone() });
win.window().dispatch_event(WindowEvent::KeyReleased { text });
}
Some(("prompts", kind)) => {
use crate::prompts::Family;
let family = match kind {
@@ -98,6 +105,7 @@ fn step(ui: slint::Weak<AppWindow>, steps: Vec<String>, i: usize) {
"cycle-shuffle" => Action::CycleShuffle,
"shuffle" => Action::Shuffle,
"hold-activate" => Action::HoldActivate,
"fullscreen" => Action::ToggleFullscreen,
other => {
log::warn!("unknown dev script step {other}");
Action::None