Skip to content

fix: resolve window focus and build issues on Windows#1494

Open
AlissonFA wants to merge 1 commit intoresponsively-org:mainfrom
AlissonFA:fix/windows-focus-and-build
Open

fix: resolve window focus and build issues on Windows#1494
AlissonFA wants to merge 1 commit intoresponsively-org:mainfrom
AlissonFA:fix/windows-focus-and-build

Conversation

@AlissonFA
Copy link
Copy Markdown

✨ Pull Request

📓 Referenced Issue

N/A

ℹ️ About the PR

This PR fixes a Windows focus issue where Responsively could flash in the taskbar and require a second click before the existing app window was brought to the foreground.

The previous Windows focus workaround listened for focus/blur events and programmatically called blur() followed by focus(). In practice, that could cancel the first foreground attempt and leave the app flashing instead of opening immediately.

This PR replaces that behavior with a simpler and more predictable window activation flow:

  • Restores the window if minimized
  • Shows the window
  • Moves it to the top of the z-order
  • Focuses it
  • Stops taskbar flashing

It also keeps the single-instance behavior so launching Responsively again brings the existing window forward instead of opening another instance.

Additionally, this PR fixes the Windows production build by enabling glob handling in the source-map cleanup script used before packaging.

🖼️ Testing Scenarios / Screenshots

Tested on Windows by generating and installing a packaged .exe.

Validation performed:

  • corepack yarn run typecheck
  • corepack yarn test
  • corepack yarn package --config.win.signAndEditExecutable=false

Manual scenarios tested:

  • Open Responsively, place another app such as Chrome or VS Code above it, then click Responsively once from the taskbar.
  • Confirm Responsively comes to the foreground on the first click.
  • Confirm it no longer flashes orange in the taskbar waiting for a second click.
  • Confirm switching back to Chrome/VS Code still works normally.
  • Launch Responsively again while it is already running and confirm the existing window is brought forward.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 3, 2026

CLA assistant check
All committers have signed the CLA.

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