Better handling of some qt and gtk applications. Used Audacious for testing.

This commit is contained in:
Storm Dragon committed 2026-11-01 21:37:01 -05:00
1 parent 300f4a7504
commit bbe931335f
15 files changed
+507 -16

No files matched your search

+29
View File
@@ -173,6 +173,35 @@ func TestNativeQtControlStates(t *testing.T) {
}
keys("Escape")
}
// Qt can report only SHOWING=false for a closing submenu, even though
// its parent action regains FOCUSED state. Restore that actual parent.
for _, closeKey := range []string{"Left", "Escape"} {
keys("F7")
waitEvent("Ordinary action", atspi.FocusedStateEvent, false)
waitSpeech("Ordinary action, menu item")
keys("Down")
waitEvent("Nested actions", atspi.FocusedStateEvent, false)
waitSpeech("Nested actions, menu item")
keys("Right")
waitEvent("Nested command", atspi.FocusedStateEvent, false)
waitSpeech("Nested command, menu item")
keys(closeKey)
// The normalized event preserves its native showing-event origin.
for {
select {
case event := <-observed:
if event.Source.Name == "Nested actions" && isFocusGainEvent(event) {
goto returned
}
case <-ctx.Done():
t.Fatal("missing focus return from submenu")
}
}
returned:
waitSpeech("Nested actions, menu item")
waitBraille("Nested actions")
keys("Escape")
}
if version == "6" {
// When the provider exports CHECKABLE, withdrawing that capability is
// authoritative and must retire the prior evidence.