feat(kiosk): boot windowed by default, fullscreen opt-in via QBZ_KIOSK_FULLSCREEN
Forcing fullscreen at kiosk boot trapped the user with no way out (Esc/F11 don't leave it, the kiosk shell has no titlebar control). Fullscreen is now opt-in for a real appliance image; the persisted-kiosk-profile case opens in a normal window. cc
This commit is contained in:
1 file changed
+13
-13
+13
-13
@@ -6701,24 +6701,24 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.global::<ShellState>()
|
||||
.set_reduce_motion(kiosk_profile || !use_gpu_renderer);
|
||||
window.global::<ShellState>().set_kiosk_profile(kiosk_profile);
|
||||
// Fullscreen-at-boot is a kiosk behavior (no separate flag): the appliance
|
||||
// owns the whole panel. Routed through slint::Window so realization
|
||||
// reconciliation keeps it (see WindowControlActions on_toggle_fullscreen at
|
||||
// ~1326); sync WindowControlActions.is-fullscreen so the titlebar control
|
||||
// agrees with reality.
|
||||
// Fullscreen-at-boot, unless QBZ_KIOSK_NO_FULLSCREEN is set — a dev escape
|
||||
// hatch to preview the kiosk layout in a normal window without the panel
|
||||
// taking over the desktop (the kiosk shell exposes no titlebar control to
|
||||
// leave fullscreen). reduce-motion above still applies either way.
|
||||
// Fullscreen-at-boot is OPT-IN (QBZ_KIOSK_FULLSCREEN=1) — a real appliance
|
||||
// image sets it so the panel owns the whole screen. We must NOT fullscreen
|
||||
// just because the persisted profile is kiosk: a user who toggles kiosk on
|
||||
// the desktop and restarts would be TRAPPED — the kiosk shell has no
|
||||
// titlebar control and neither Esc nor F11 leave fullscreen (incident
|
||||
// 2026-07-11). Windowed by default keeps the OS titlebar reachable; routed
|
||||
// through slint::Window so realization reconciliation keeps it (see
|
||||
// WindowControlActions on_toggle_fullscreen ~1326). reduce-motion above
|
||||
// applies either way.
|
||||
if kiosk_profile {
|
||||
if std::env::var_os("QBZ_KIOSK_NO_FULLSCREEN").is_some() {
|
||||
log::info!("[kiosk] profile active (reduce-motion on); fullscreen skipped (QBZ_KIOSK_NO_FULLSCREEN)");
|
||||
} else {
|
||||
log::info!("[kiosk] profile active -> fullscreen-at-boot + forced reduce-motion");
|
||||
if std::env::var_os("QBZ_KIOSK_FULLSCREEN").is_some() {
|
||||
log::info!("[kiosk] profile active -> fullscreen-at-boot (QBZ_KIOSK_FULLSCREEN) + forced reduce-motion");
|
||||
window.window().set_fullscreen(true);
|
||||
window
|
||||
.global::<WindowControlActions>()
|
||||
.set_is_fullscreen(true);
|
||||
} else {
|
||||
log::info!("[kiosk] profile active (reduce-motion on); windowed — set QBZ_KIOSK_FULLSCREEN=1 for appliance boot");
|
||||
}
|
||||
}
|
||||
// Interface-size preset: publish the factor so `.slint` bindings that must
|
||||
|
||||
Reference in new issue
Block a user