Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10: focus is not put to window but taskbar blinks #929

Closed
bpasero opened this issue Dec 2, 2015 · 11 comments · Fixed by #13255
Closed

Windows 10: focus is not put to window but taskbar blinks #929

bpasero opened this issue Dec 2, 2015 · 11 comments · Fixed by #13255
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Dec 2, 2015

This can happen when code is already running and you start it again from the command line: The process that is started is killed very early after sending a IPC message to the running instance and that running instance is then trying to restore/focus the last active window which often fails.

Related: electron/electron#2867

As a workaround if you have access to the windows registry:

  • regedit.exe
  • find ForegroundLockTimeout
  • change its value to 10 (decimal)
  • restart windows
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Dec 2, 2015
@bpasero bpasero self-assigned this Dec 2, 2015
@bpasero bpasero modified the milestones: Dec 2015, Backlog Dec 2, 2015
@bpasero
Copy link
Member Author

bpasero commented Dec 22, 2015

Pushed a workaround.

@bpasero bpasero closed this as completed Dec 22, 2015
@bpasero bpasero modified the milestones: Jan 2016, Backlog Dec 22, 2015
@bpasero bpasero added the verified Verification succeeded label Jan 25, 2016
@bpasero
Copy link
Member Author

bpasero commented Feb 9, 2016

Reopening, using the window.show() workaround causes issues as it will undock windows it seems.

@sp00x
Copy link

sp00x commented Sep 6, 2016

This happens EVERY time for me - on all 3 machines I use it on, Windows 7 and Windows 10.

@bpasero bpasero added the help wanted Issues identified as good community contribution opportunities label Sep 13, 2016
@bpasero bpasero changed the title Windows 10: Sometimes focus is not put to window but taskbar blinks Windows 10: focus is not put to window but taskbar blinks Sep 22, 2016
@bpasero
Copy link
Member Author

bpasero commented Sep 30, 2016

As a workaround if you have access to the windows registry:

  • regedit.exe
  • find ForegroundLockTimeout
  • change its value to 10 (decimal)
  • restart windows

@jtmontana
Copy link

@bpasero Just tried the suggested workaround and it did not work.

Using Windows 10 Home

@bpasero bpasero modified the milestones: October 2016, Backlog Oct 7, 2016
@bpasero bpasero removed the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Oct 7, 2016
the-ress added a commit to the-ress/vscode that referenced this issue Oct 7, 2016
@bpasero bpasero added the verification-needed Verification of issue is requested label Oct 7, 2016
@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Oct 26, 2016
@SyntaxErrol
Copy link

I've been hit with this bug suddenly after having code working_dir filename style execution from WinSCP work flawlessly for months. On top of that, the suggested workaround doesn't work as ForegroundLockTimeout is nowhere to be found in my registry.

Reading this it looks like the issue was fixed but has there been a regression?

@calebcbaker
Copy link

Seems to have re-emerged for me. On first launch of VSCode it will focus on top of other windows, but on subsequent launches it stays in the background and flashes in the taskbar. I searched the registry but can't find any reference to ForegroundLockTimeout.

I'm on Win10 Build 10240

@SyntaxErrol
Copy link

On top of that, the suggested workaround doesn't work as ForegroundLockTimeout is nowhere to be found in my registry.

Must have made the rookie mistake of not starting the search in the registry root earlier. It turns out there are several hits and the first one in \HKEY_CURRENT_USER\Control Panel\Desktop seems to have worked.

@ejmann248
Copy link

I started running into this issue today. Started when I would open a new window from my current window and the new window would not appear on screen, only in the taskbar. Upon restarting the PC, no windows now appear. Tried the workaround but with no luck. Windows10 Build 15063

@f00z
Copy link

f00z commented Sep 29, 2017

Update: I made it to work by right clicking the task bar editor thumbnail of VSC and clicking on move. This made my cursor move to the edge of the desktop. I then dragged the corner of the VSC window to bring it to the center. It looks like VSC window was off the desktop boundary for some reason

I have made registry changes to hkey_local_machine and hkey_current_user as mentioned but it still doesn't work. Any other suggestions? Reinstalling doesn't fix the issue either.

@stefangabos
Copy link

This is happening to me also since the previous 2 releases. Changing the value of ForegroundLockTimeout did not help

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants