chandra-ctl windows: how Chandra sees each window, and what the pointer is over
CI / test (push) Canceled after 7m7s
CI / test (push) Canceled after 7m7s
For "this window won't resize" reports (V's Gajim still not resizing on real hardware, while a libadwaita window built like Gajim's resizes headless on both hosts): one line per window with its frame kind (client-frame / chandra-frame), layout state (floating, tiled, maximized, fullscreen), box, buffer, the client's shadow per side, min/max size and title, then the pointer position and what it's over (a resize grip and which edge, a window, a title bar, a tiling divider, the panel, the desktop). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiu4r7mEXBdKY6cgv6
This commit is contained in:
4 files changed
+123
-1
No files matched your search
@@ -396,3 +396,18 @@ test "a subsurface (Chrome's toolbar bubbles) is drawn over its window and gets
|
||||
assert_eq(comp.windows.get(1UL).unwrap().subs.length(), 0)
|
||||
assert_true(comp.compose_frame().pixel(ox + 110, oy + 60) != blue)
|
||||
}
|
||||
|
||||
///|
|
||||
test "chandra-ctl windows says how a GTK window is framed and what the pointer is over" {
|
||||
let (comp, c, shm, surf, xdg, tl) = csd_setup("report")
|
||||
ignore(gtk_frame(comp, c, shm, surf, xdg, tl))
|
||||
ignore(gtk_frame(comp, c, shm, surf, xdg, tl))
|
||||
let r = comp.windows.get(1UL).unwrap().client_rect()
|
||||
comp.handle_input(@nested.InputEvent::PointerMove((r.x + r.w + 5).to_double(), (r.y + r.h / 2).to_double()), 60U)
|
||||
let (lines, ok) = comp.control_command("windows")
|
||||
assert_true(ok)
|
||||
assert_true(lines[0].has_prefix("1 org.gnome.Nautilus client-frame floating "))
|
||||
assert_true(lines[0].contains(" shadow=24,24,24,24 "))
|
||||
assert_true(lines.contains("pointer " + (r.x + r.w + 5).to_string() + "," + (r.y + r.h / 2).to_string() + " over resize grip right of 1"))
|
||||
assert_eq(lines[lines.length() - 1], "ok 1 windows")
|
||||
}
|
||||
Reference in new issue
Block a user