You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was really not sure about other users of BrowserWindow.focus() so instead of blindingly adding app.focus, I would wait for regression reports from users.
It seems quite obvious to me that we would want app.focus({ steal: true }) everywhere where VSCode is possibly not in the foreground and some action triggers it:
a second invocation from command line (this is covered)
URL handlers (e.g. from a browser)
a debug breakpoint (there is a setting in debug to focus window on breakpoint hit)
drag and drop from other applications
interacting with the macOS Dock
Some thoughts:
it is unclear to me what app.focus means on Windows and Linux where imho we do not need to call this method at all
should we only call this on macOS only?
the URL handler is another potential candidate of this, but I was not sure if the application would already get focus for free when a URL is handled (e.g. this can happen when VSCode is launched from a web browser)
we possibly need to fix debug to force focus when a breakpoint is hit
unclear to me if interacting with DND is now broken
unclear to me if interacting with dock is now broken
The text was updated successfully, but these errors were encountered:
also steal focus when we handle a URL to ensure that the flow from clicking on a application link is not broken
As a consequence, methods for Window.focus() now have an option force: boolean to enable app.focus({ steal: true}), but we only use this on macOS where we know the flow is broken from the Electron update.
I ended up only using
app.focus({ steal: true })
in one place: where a second instance from the command line talks to the first instance:vscode/src/vs/platform/launch/electron-main/launchMainService.ts
Line 79 in 3d0d50c
I was really not sure about other users of
BrowserWindow.focus()
so instead of blindingly addingapp.focus
, I would wait for regression reports from users.It seems quite obvious to me that we would want
app.focus({ steal: true })
everywhere where VSCode is possibly not in the foreground and some action triggers it:Some thoughts:
app.focus
means on Windows and Linux where imho we do not need to call this method at allThe text was updated successfully, but these errors were encountered: