From 885ca01ff77208c82564eaf44bdda9aefa562f79 Mon Sep 17 00:00:00 2001 From: Ansho Rei Date: Fri, 6 Nov 2026 20:27:29 +0100 Subject: [PATCH] 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. --- src/app.rs | 1 + src/devscript.rs | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/app.rs b/src/app.rs index 0896d75..e3be474 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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; } diff --git a/src/devscript.rs b/src/devscript.rs index 95fd957..32d42ac 100644 --- a/src/devscript.rs +++ b/src/devscript.rs @@ -56,6 +56,13 @@ fn step(ui: slint::Weak, steps: Vec, 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, steps: Vec, 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