diff --git a/compositor/host/input_test.mbt b/compositor/host/input_test.mbt index 3d19e22..6385bd9 100644 --- a/compositor/host/input_test.mbt +++ b/compositor/host/input_test.mbt @@ -505,7 +505,7 @@ test "modules are added until the panel is full" { } ///| -test "Desktop Pulse reads live machine and window state through its granted interfaces and can raise a window" { +test "Desktop Pulse reads live machine and window state through its granted interfaces and draws no task icons" { let socket_path = "/tmp/wayland-moon-pulse-" + @sys.getpid().to_string() + ".sock" @@ -529,18 +529,18 @@ test "Desktop Pulse reads live machine and window state through its granted inte assert_eq(comp.shell.win_list.length(), 2) let r = comp.shell.slot_rect(slot) assert_true(r.w >= 300) - // Clicking each window's chip raises that window (first chip starts at x = 280). + // Pulse no longer draws a chip (task icon) per window: clicking where the chips used to be + // (from x = 280) focuses nothing. + let before = comp.windows.iter().filter(kv => kv.1.focused).map(kv => kv.0).collect() for i = 0; i < 2; i = i + 1 { - let id = comp.shell.win_list[i].id let cx = r.x + 280 + i * 23 + 10 let cy = r.y + r.h / 2 comp.handle_input(@nested.InputEvent::PointerMove(cx.to_double(), cy.to_double()), (10 + i * 4).reinterpret_as_uint()) comp.handle_input(@nested.InputEvent::PointerButton(272U, true), (11 + i * 4).reinterpret_as_uint()) comp.handle_input(@nested.InputEvent::PointerButton(272U, false), (12 + i * 4).reinterpret_as_uint()) ignore(comp.compose_frame()) - assert_true(comp.windows.get(id).unwrap().focused) - let others_focused = comp.windows.iter().filter(kv => kv.0 != id && kv.1.focused).count() - assert_eq(others_focused, 0) + let now : Array[UInt64] = comp.windows.iter().filter(kv => kv.1.focused).map(kv => kv.0).collect() + assert_eq(now, before) } } diff --git a/compositor/wasm/testdata/pulse.component.wasm b/compositor/wasm/testdata/pulse.component.wasm index a075039..dceb9da 100644 Binary files a/compositor/wasm/testdata/pulse.component.wasm and b/compositor/wasm/testdata/pulse.component.wasm differ