Fix Wine window title announcements on foreground switches
Wine review establishes navigation ownership and stores the window title without speaking an activation. The native title controller treated that metadata as an already announced title, suppressing the introduction when review focus arrived first. Frame-to-control focus updates also reset the window title controller, cancelling pending introductions and discarding duplicate history. Distinguish Wine review ownership from spoken AT-SPI activations when classifying and deduplicating native introductions. Use the native Wine application identity when waiting for committed application preferences, so introductions remain audible with automatic title changes disabled while subsequent title changes honor that application's settings. Separate object focus cleanup from window title cleanup. Wine review revisions now retain the pending title and its duplicate history; actual foreground transitions, native window lifecycle cleanup, screen lock, and shutdown continue to reset title state. Preserve XTerm/Fenrir handoff and ordinary AT-SPI activation deduplication. Add regressions for both native/review arrival orders, ordinary Wine windows and virtual desktop children, duplicate reports, return to the same window, and application preference handoff. Add a private D-Bus event-loop test for a frame-to-control focus burst and document focused verification and live acceptance procedures in tests/window_titles.md. Validation: - Confirmed the new title introduction, preference handoff, and private focus-burst regressions fail before the fix and pass afterward. - go test ./... -count=1 passed with local socket access; the sandboxed attempt was blocked by Unix and loopback speech fixture sockets. - Focused Title, WineReview, XTerm, and Foreground tests passed with the race detector. - Private D-Bus TestPrivateWineTitleSurvivesReviewFocusBurst passed with the race detector. - go vet ./internal/app, the reader build, and git diff --check passed. Installed-reader behavior, real Wine/X11 switching, physical Alt+Tab, audible speech, and physical Braille acceptance remain pending. The private fixture uses copied foreground metadata and a real registry, not a real Wine window. No installed reader was replaced.
This commit is contained in:
1 parent
7f78177786
commit
6754c8ef6c
5 files changed
+236
-5
No files matched your search
@@ -181,15 +181,20 @@ func processEventsWithAttributes(
|
||||
event, _ := state.pending.terminalDeletion.take()
|
||||
speak(event)
|
||||
}
|
||||
clearOwnedFocus := func() {
|
||||
clearObjectFocus := func() {
|
||||
ocrSession.Retire()
|
||||
titles.reset()
|
||||
state.clearOwnedFocus(brailleOutput, browser, objectReview, speech)
|
||||
}
|
||||
clearOwnedFocus := func() {
|
||||
titles.reset()
|
||||
clearObjectFocus()
|
||||
}
|
||||
var wineReview *wineReviewFocusController
|
||||
var wineReviewChanges <-chan struct{}
|
||||
if live != nil && live.wineReview != nil {
|
||||
wineReview = &wineReviewFocusController{registry: live.wineReview, logger: logger, state: &state, foreground: foreground, titles: titles.source, gate: focusGate, worker: objectReview, clear: clearOwnedFocus}
|
||||
// Wine control revisions reset object review, but a pending title and
|
||||
// its duplicate history belong to the foreground window's lifetime.
|
||||
wineReview = &wineReviewFocusController{registry: live.wineReview, logger: logger, state: &state, foreground: foreground, titles: titles.source, gate: focusGate, worker: objectReview, clear: clearObjectFocus}
|
||||
wineReviewChanges = live.wineReview.Changes()
|
||||
wineReview.changed()
|
||||
defer wineReview.retire()
|
||||
|
||||
Reference in new issue
Block a user