Clicking a window raises it: go through the WM's Activate so stacking order changes
CI / test (push) Failing after 34s

Window clicks, title-bar drags, resize grabs and focus handoff after close emitted Focus/Raise
directly; Raise only marked damage, so the WM's floating order never changed and a focused
window could stay drawn under another. They now use handle_request(Activate) (activate_window).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Sonnet 5.5 committed 2026-11-25 03:11:58 -08:00
1 parent 69a163bc08
commit 4b99b0063e
2 files changed
+33 -7

No files matched your search

+21
View File
@@ -922,3 +922,24 @@ test "the desktop card position is saved when dropped and restored" {
assert_eq(b.shell.desk_y, a.shell.desk_y)
}
}
///|
test "clicking a floating window brings it in front of the others" {
let socket_path = "/tmp/wayland-moon-z-" + @sys.getpid().to_string() + ".sock"
let theme = @scene.ThemeTokens::moon_night()
let comp = @host.MoonPlasmaCompositor::new(socket_path, theme, 1280, 720).unwrap()
ignore(open_and_configure_client(comp, socket_path, "A", "a"))
ignore(open_and_configure_client(comp, socket_path, "B", "b"))
comp.set_layout_mode(@wm.LayoutMode::Floating)
ignore(comp.compose_frame())
let order = comp.wm.stacking_order()
assert_eq(order.length(), 2)
let (back, front) = (order[0], order[1])
// Click the window in back (its title bar, away from any overlap): it comes to the front.
let g = comp.windows.get(back).unwrap().geometry
click_at(comp, g.x + 20, g.y - 16, 1U)
ignore(comp.compose_frame())
let after = comp.wm.stacking_order()
assert_eq(after[1], back)
assert_eq(after[0], front)
}