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

VSCode opens off-screen #35148

Closed
robinsh opened this issue Sep 26, 2017 · 11 comments
Closed

VSCode opens off-screen #35148

robinsh opened this issue Sep 26, 2017 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Milestone

Comments

@robinsh
Copy link

robinsh commented Sep 26, 2017

  • VSCode Version: Code 1.16.1 (27492b6, 2017-09-14T16:38:09.760Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
vscode-sidebar Acr 1.0.0
yaml ada 0.0.9

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.

  1. Open VSCode.
  2. Drag the window to one of the external monitors.
  3. Close VSCode.

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.

  1. Disconnect the external monitors, at which point Windows moves all open Windows to the Surface tablet. Reconnect the external monitors and move all the windows back to where they were.
  2. Make sure the window is selected, click Alt+Space, M, then use the arrows to move it down until you can see it.

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.

@asmundwego
Copy link

asmundwego commented Oct 12, 2017

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.

@robinsh
Copy link
Author

robinsh commented Oct 12, 2017

@asmundwego It is still an issue for me as well.

@bpasero
Copy link
Member

bpasero commented Oct 13, 2017

@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.

@robinsh
Copy link
Author

robinsh commented Oct 16, 2017

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.)

@bpasero
Copy link
Member

bpasero commented Oct 17, 2017

@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?

@bpasero bpasero reopened this Oct 17, 2017
@bpasero bpasero removed this from the September 2017 milestone Oct 17, 2017
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster labels Oct 17, 2017
@bpasero bpasero added this to the On Deck milestone Oct 17, 2017
@felubra
Copy link

felubra commented Oct 17, 2017

This issue seems related with different display DPIs.

  • VSCode Version: Code 1.17.1 (1e9d365, 2017-10-10T14:24:50.851Z)
  • OS Version: Windows_NT amd64 1703 build 15.063.674

I have a laptop with:

  • Embeded 1080p display set to 125% DPI scaling
  • External 1080p monitor set to 100% DPI scaling.

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.

@bpasero
Copy link
Member

bpasero commented Oct 17, 2017

@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?

@bpasero
Copy link
Member

bpasero commented Oct 17, 2017

@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:

  • monitor arrangement
  • resolutions of monitors
  • exact steps

@bpasero bpasero modified the milestones: On Deck, October 2017 Oct 17, 2017
@felubra
Copy link

felubra commented Oct 17, 2017

@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).
In the following image, "1" represents the embeded screen at 125% scaling, "2" is the external one at 100% scaling, both at 1920x1080.

image

Steps to reproduce:

  1. Set-up two displays with different DPI scales, one at 125% (main), another at 100% (external).
  2. Open VS Code: the window should be at the center of the main display desktop, in restored state (not maximized).
  3. Move the window to the center of external's desktop, keep window in restored state.
  4. Close VS Code
  5. Open VS Code: the window should be at the last position but it is off-center or already partially off-screen in the external display.
  6. Close VS Code.
  7. Open VS Code again: the window is positoned futher away of the last position or already completely off-screen.

Notes:

  • After step 5, you could also create a new window (menu File > New Window) - that new window will be positioned partially off screen.
  • In my case I've notice the the window goes up and to the right after each restart.

@robinsh
Copy link
Author

robinsh commented Oct 17, 2017

monitor_setup
This is my monitor setup. The surface tablet (1) is set to scale 200%. Resolution is 2736x1824.
The external monitors (2 and 3) are 1920x1080, scale is 100%.

I've already given the exact steps twice. They really are that simple.

re: 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? YES.
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? --> Nope, completely off screen. But hey, it's on the left of that monitor. So it seems the problem may just be on the y-axis, and not the x-axis. In this case, anyway.

@bpasero
Copy link
Member

bpasero commented Oct 18, 2017

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.

@bpasero bpasero closed this as completed Oct 18, 2017
@bpasero bpasero added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 18, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 2, 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 *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants