-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
VSCode opens off-screen #35148
Comments
This is still an issue for me. I noticed in the release notes that this should have been fixed (version 1.17.1) but it still is a problem. I have a Dell ZBook laptop with external monitor in addition to the built-in laptop monitor. If I close VS Code on the external monitor, the next time I open it, the position is not the same, and usually parts of window is outside screen. |
@asmundwego It is still an issue for me as well. |
@asmundwego @robinsh to be clear, you are seeing the window not restoring at the proper location right? You are not seeing it "off" screen (= invisible)? If you see the window off-screen can you provide steps to reproduce? Preferably with details about your multi-monitor setup. |
For me, it is completely "off screen", i.e. invisible. To get it back, I have to either disconnect the external monitors, at which point Windows moves all open windows to the Surface tablet, or use Alt-Space + M, and then use the cursor keys to move the screen down. Steps to repro: 1. Open VS Code, move it to one of the external monitors. 2. Close VS Code. 3. Open VS Code, it's off screen. I have a Surface 4 Pro tablet connected to two external monitors using a docking station. (Had the same problem with the tablet connected to just one external monitor.) |
@robinsh ok so your problem seems to be different from what I had in mind where you would start in a multi monitor setup, close VS Code, disconnect the external monitors (or actually change their arrangement) and then start VS Code again. Your case seems to be that the position of VS Code changes just by restarting VS Code and without doing anything with the monitors, is that right? If so, does it change anything if you move the window to the upper left corner of one monitor (not maximized), e.g. making it a quarter the size of the monitor and then restart? Does it only partially get offscreen? |
This issue seems related with different display DPIs.
I have a laptop with:
When the two displays have the same DPI setting, the issue does not happen, i.e. the window positioning is not off screen when opening the VS Code. |
@felubra can you clarify what you mean with "off screen" exactly: is the entire window no longer visible or just parts of the window outside the screen? |
@robinsh I just tried to reproduce your issue, have a similar setup (1 SurfaceBook, 2 external monitors) and could not. Could you tell me your setup in more detail, specifically:
|
@bpasero just parts of the window. I've created a user for testing and noticed that the window goes futher away (up and right of last position) each time VS Code starts to completely going off-screen after some restarts. Monitor arrangement: two, side by side (extended desktop). Steps to reproduce:
Notes:
|
Thanks, I can reproduce the issues and believe they are all caused by #36122 which I am closing this one as duplicate of. Bottom line is that I am setting coordinates for a window and they end up outside of the monitor. |
Steps to Reproduce:
I have a Surface tablet with two external monitors. This problem has popped up recently, because it used to work and now it doesn't. I don't know if it's a problem with Windows or with VSCode. It affects VSCode and PowerShell ISE.
Next time you open it, it will be off the screen and you won't be able to see it. I know it's off-screen because when you click on the icon a couple of times, you can see it minimizing it and then reopening it off-screen.
To make it appear again, you have choices.
Also, you can make sure you drag the last open VSCode window back to the Surface tablet before closing it. Then next time you open it, it will appear there and you can drag it back to the external monitor.
Reproduces without extensions: Yes/No
I don't know. Seems hard to believe that a YAML extension would cause a problem with the application showing up within the screen boundaries.
The text was updated successfully, but these errors were encountered: