From e92fce95d56269cb73a00037786c57ab208c8552 Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 17 Nov 2026 21:08:01 +0000 Subject: [PATCH] ui-contract: the palette-level test expects Windows' inactive palette at the bottom --- crates/ui-contract/tests/it/runtime/windows.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ui-contract/tests/it/runtime/windows.rs b/crates/ui-contract/tests/it/runtime/windows.rs index 09e3afc5d..56e6f8bca 100644 --- a/crates/ui-contract/tests/it/runtime/windows.rs +++ b/crates/ui-contract/tests/it/runtime/windows.rs @@ -244,9 +244,11 @@ fn a_palette_drops_its_level_while_the_app_is_inactive() { for _ in 0..2 { assert_eq!(frame(false, true), on_top, "focus moved to the palette's window: the app stays active in every frame"); } - // Focus leaves the palette's window, which the main window's input still lists as focused. + // Focus leaves the palette's window, which the main window's input still lists as focused. Windows puts an + // inactive app's palette at the bottom, since `Normal` there stands in front of other apps' windows. + let inactive = Some(if cfg!(windows) { egui::WindowLevel::AlwaysOnBottom } else { egui::WindowLevel::Normal }); frame(false, false); - assert_eq!(frame(false, false), Some(egui::WindowLevel::Normal), "the frame after focus left every window"); + assert_eq!(frame(false, false), inactive, "the frame after focus left every window"); frame(true, false); assert_eq!(frame(true, false), on_top, "the frame after the main window took focus again"); }