Allow keyboard interruption of i3 speech during terminal handoff
This commit is contained in:
1 parent
a29910d002
commit
e7d02b1f62
9 files changed
+205
-8
No files matched your search
@@ -45,6 +45,8 @@ type speechRequest struct {
|
||||
presentationGeneration *uint64 // Checked under the speech owner mutex.
|
||||
presentationRevision *uint64
|
||||
|
||||
InterruptDuringHandoff bool // Desktop speech remains keyboard-interruptible in the delegated terminal.
|
||||
|
||||
Window atspi.ObjectID
|
||||
IntroducesWindow bool
|
||||
ReadAll []readAllPart
|
||||
@@ -138,6 +140,7 @@ type speechWorker struct {
|
||||
lastInputTimestamp uint32
|
||||
titleWindow atspi.ObjectID
|
||||
titleInput titleInputPolicy
|
||||
handoffSpeech bool // Armed by accepted desktop speech; cleared by cancellation, including after SPEAK returns.
|
||||
confirmationID uint64 // Owned under mutex; reset on completion or user interruption.
|
||||
confirmationSerial uint64
|
||||
|
||||
@@ -253,6 +256,9 @@ func (worker *speechWorker) Enqueue(request speechRequest) {
|
||||
worker.pending = worker.pending[:speechQueueCapacity-1]
|
||||
worker.overflow++
|
||||
}
|
||||
if request.InterruptDuringHandoff {
|
||||
worker.handoffSpeech = true
|
||||
}
|
||||
worker.titleInput.observe(request)
|
||||
worker.presentationRevision++
|
||||
worker.pending = append(worker.pending, request)
|
||||
|
||||
Reference in new issue
Block a user