mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 04:55:58 +03:00
[PR #655] [MERGED] fix(terminal): restore DEC private modes on focus-in to fix Windows Terminal mouse tracking #686
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#686
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/655
Author: @Hona
Created: 2/9/2026
Status: ✅ Merged
Merged: 2/10/2026
Merged by: @kommander
Base:
main← Head:fix/focus-restore-terminal-modes📝 Commits (3)
6ad52ecfix(terminal): restore DEC private modes on focus-in to fix Windows Terminal mouse trackingdb9d224fix(terminal): track active kitty keyboard flags in state and pop-then-push on restorea90e7bclow ceremony📊 Changes
8 files changed (+599 additions, -0 deletions)
View changed files
➕
packages/core/src/examples/focus-restore-demo.ts(+310 -0)📝
packages/core/src/examples/index.ts(+7 -0)📝
packages/core/src/renderer.ts(+5 -0)➕
packages/core/src/tests/renderer.focus-restore.test.ts(+200 -0)📝
packages/core/src/zig.ts(+9 -0)📝
packages/core/src/zig/lib.zig(+4 -0)📝
packages/core/src/zig/renderer.zig(+6 -0)📝
packages/core/src/zig/terminal.zig(+58 -0)📄 Description
When Windows Terminal / ConPTY loses focus (alt-tab, minimize, tab switch), it silently strips DEC private mode escape codes even though the app's internal state still thinks they're enabled.
Now we listen to the focus signal and resend the escape codes.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.