8000 Keep terminal focus when switching workspaces with reduced motion by strayge · Pull Request #469 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

Keep terminal focus when switching workspaces with reduced motion - #469

Merged
amirlehmam merged 1 commit into
amirlehmam:masterfrom
strayge:fix/reduced-motion-workspace-focus-pr
Nov 22, 2026
Merged

amirlehmam merged 1 commit into
amirlehmam:masterfrom
strayge:fix/reduced-motion-workspace-focus-pr

Conversation

@strayge
@strayge strayge commented Nov 21, 2026
Copy link
Copy Markdown
Contributor

Problem

With reduced motion enabled (like connection via RDP), switching workspaces leave the terminal unable to receive keyboard input until the user clicks it.

Changes

  • Set transition duration to 0s under prefers-reduced-motion so workspace visibility changes immediately.
  • Update the reduced-motion CSS test to check those durations.

Testing

  • Full Vitest suite: 7,071 passed, 15 skipped.

Reduced-motion CSS applied a short transition to all elements. This also
delayed workspace visibility changes.

The terminal was still hidden when the focus code ran. Hidden elements
cannot receive keyboard focus. The user had to click the pane to type.

Windows reports reduced motion when system animations are off. RDP
session settings can disable these animations.

Set the transition duration to zero. Keep the short animation duration so
animationend events still fire.
@strayge
strayge marked this pull request as ready for review November 21, 2026 23:11
@amirlehmam
amirlehmam merged commit f9673eb into amirlehmam:master Nov 22, 2026
@amirlehmam
Copy link
Copy Markdown
Owner

Merged, thank you. I checked that nothing in the renderer waits on a transitionend, so dropping transitions to 0s under reduced motion strands no state machine, and the RDP case you describe is exactly where the 0.01ms transition on the workspace's inline visibility left the terminal unfocusable. It ships in the next release, going out today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0