-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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
Full Screen at certain resolutions causes bottom bar to overflow. #85592
Comments
Looks like #83456, however it's not reproducible in insiders builds after #85266 was merged and cannot reproduce in 1.40.2 (zip download) /cc @deepak1556 |
Thanks @IllusionMH , yeah it sounds similar but that one is definitely fixed.
@GeorgeWL can you be more specific about the setup in which you see this issue ? The resolution and how the displays are arranged. Also can you attach a video demo. Thanks! |
Well I'm not really sure why, but if I full screen it on my bottom screen, there's no issue there. But on either of my two top screens, it is. Top Left (screen 2): 2560 x 1440 (100% scaling) Ignore the blurring, that's intentional obfuscation so don't get in trouble with work security team. |
I have the exact same issue. It appeared today after updating to version 1.40.2 (f359dd6). I have a two monitor setup:
VS Code looks fine in my primary monitor, but goes beyond the screen boundaries in my second monitor. I'm happy to provide more info in order to help resolve this |
That's something worth noting, it did only start after the latest update (1.40.2) Before the update, I'd had no similar issues and hadn't seen this issue. |
I'm having the same issue in 1.40.2 (issue did not exist in prior version). I have a laptop hooked up to an external monitor. The laptop screen is at 3840x2160, the monitor is at 2560x1440, and scaling is set to 250%. When Code is maximized in the external monitor, all 4 edges the window hang off the edges of the screen (it's particularly noticeable on the bottom bar, but all 4 edges are definitely doing it). |
now that you mention it @SonOfHans yeah all 4 edges of mine hang off the edge of the screen, just only by a pixel or two, except the bottom bar, which is by like 10-20 pixels. Temp workaround for now is to turn off the much prettier |
Just got a new Surface Book 2 at work and that was one of the first things I noticed. |
External monitors are 1920 x 1080 (Recommended) with 100% (Recommended) scaling. |
It's a bug in Electron afaik and they don't seem to care about it that much. |
I've had it with all this negative talk about Electron. I'm switching to
Proton.
…On Fri, Jul 17, 2020 at 7:13 PM Benjamin Staneck ***@***.***> wrote:
It's a bug in Electron afaik and they don't seem to care about it that
much.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#85592 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBNXX6TSZWZ7ZJJXBN5M4TR4DLI3ANCNFSM4JRVEVEQ>
.
|
@davidrimshnick are you positive? I don't find it so attractive. Your decision seems a little bipolar |
Does anyone have the issue tracker link for Electron for this issue?
…On Sat, Jul 18, 2020 at 3:06 AM kcbleeker ***@***.***> wrote:
@davidrimshnick <https://github.com/davidrimshnick> are you positive? I
don't find it so attractive. Your decision seems a little bipolar
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#85592 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBNXXZH6YVFU3G4CBST6ILR4FCYDANCNFSM4JRVEVEQ>
.
|
I have this issue, and I think I have a reliable way to reproduce it, a possible explanation, and a workaround. Background: I have one high-DPI display on a laptop, and a standard DPI monitor. Steps to reproduce:
Observations: At step 3, right-clicking on the title bar will display a standard-sized system menu on the high-DPI display; after step 4, right-clicking on the title bar will display a larger-than normal sized system menu on the low-DPI display. As if the DPI scaling has not quite fully changed when the window moved between the monitors. The same applies the other way around: moving a working low-DPI window to the high-DPI display shows a small system menu. Another hint: in the overflowed part (on the other monitor) clicks are passed through as if it wasn't there, so this area seems clipped for click handling. Speculation: I have a feeling that DPI scaling used by the system menu applies to other metrics, such as the window border size (for resizing), and this difference in scaling probably accounts for the window overflowing by a small amount. It looks like it's usual for Windows to maximize slightly outside the visible area (presumably for the invisible resize border? -- Update: found this article about it ), and it must apply some offset for the client area and visual clipping. Perhaps the logic for frameless windows is not quite right: maybe EnableNonClientDpiScaling() is not called; or values from GetSystemMetrics() were cached and it was not called again after the DPI change; or there is custom maximize logic that does not properly take the metric into account; or that the offsets are themselves being DPI scaled. Workaround: The only way I know is to close all VS Code windows and re-open them while the standard DPI display is attached Edit: It sounds very much like the sort of thing described in this (fixed) Electron issue comment: electron/electron#8728 (comment) -- perhaps the difference is that the window changes DPI. |
I now have a good workaround for the issue, see: https://github.com/danielgjackson/vscode-maximize-fix This program simply removes the "WS_CAPTION" window style on any VS Code windows, and this fixes the issue for me. This is clearly not the real answer, and it may just be working around the symptoms and not the cause. Edit: I've now made a VS Code extension for it: https://marketplace.visualstudio.com/items?itemName=danielgjackson.vscode-maximize-fix |
I'm having the same issue as above, the extension posted above by @danielgjackson fixed it for me. I tried switching to native and back to custom but even with dark mode set as my default the white bar remained. Screenshots of my monitor setup for reference. Similar to another user above I'm using a Surface with a lower resolution external monitor. |
This should be fixed with latest insiders https://code.visualstudio.com/insiders/ , please comment if its still an issue. Thanks! |
@deepak1556 gave it a quick check:
And still no luck for me 😢 Here's a screenshot of entire screen: Bottom bar (as well as all other edges of the window sticks outside). Added a Google Chrome window panned to the right side of screen for comparison. |
@deepak1556 I'm afraid I don't think Insiders 1.50 fixes this issue. I don't envy you getting to the bottom of this, it looks like a story of mixed-DPI (what was connected when launched vs connected later), window styles and client areas. Hopefully some of the following details may help you. Firstly, I made sure I was not running my "vscode-maximize-fix" extension (which works around this issue by changing the window style). I have an internal high-DPI monitor:
I used Spy++ to measure window coordinates, but I think it's not high-dpi aware so the ones on Monitor 1 are scaled to 1/3. Spy++ measures a Notepad window (as it is per-monitor DPI aware) as:
Spy++ measures a VS Code Insiders 1.50 (all other instances closed, opened while only Monitor 1 active) as:
Keeping VS Code-Insiders running, connecting an external monitor as the primary monitor (to the right of Monitor 1):
Spy++ measures a Notepad window as:
...the overflowed window coordinates of Notepad are NOT visible, this seems to be a bit of a windows hack for standard window styles to push their resizing borders off the edge, even though they're not actually visible when maximized on multi-monitors; see: https://devblogs.microsoft.com/oldnewthing/20120326-00/?p=8003 Spy++ measures VS Code Insiders 1.50 (kept open since the different-DPI Monitor 2 was added)
...the maximized window overflows on Monitor 2, and the overflow is visible on the edge of Monitor 1. Finally, restarting a fresh VS Code Insiders 1.50 while both monitors are connected (the primary is the 100% dpi), gives:
...with no visible overflow on either monitor, but a white visible band of 10 pixels along the top when maximized on Monitor 1. Something that may be a hint is that not everything is getting reset when moving between the high/low dpi monitors: I notice that the system menu (Alt+Space or right-click title bar) is not correctly rescaling when the window moves between the two monitors.
...is it possible that perhaps the system metrics used might also not be getting rescaled properly (or cached)? If you find out why the system menu is not getting rescaled, I'd bet you would be closed in finding out why this issue is happening. (I'm running 2004 build 19041.508). |
Thanks for testing @mlewand Also thanks @danielgjackson for the added details, the core of the change is in electron/electron#25052. Basically, when
https://source.chromium.org/chromium/chromium/src/+/master:ui/views/win/hwnd_message_handler.cc;l=2785-2800 and returns the results in screen pixels scaled to the monitors' DPI. Finally when
most likely this is not returning the correct monitor during the drag operation, which would align with your observation. I am OOF this week, will look into this after I return to work. Also there is a round-off error that comes with |
Need some testing help again if the latest insiders https://code.visualstudio.com/insiders/ fixes the issue. Thanks! |
I have a laptop 4k with a secondary 1080 screen, and with Insiders version the issue is not present. |
Cool, works also for me in the latest insider build 🎉 Now I'm anxiously waiting for the October release 😃 |
Workaround for me was just close all VS Code windows, disconnect my dock, reconnect my dock, re-open VS Code. Looking forward to the standard release to fix this. |
Present for me as of 1.51.0 (2020-11-05) |
Weird, it's fixed for me. Works like a charm @ 1.51.0. |
huh :( I'm still having to do the Win10 System (Enhanced) scaling |
Full Screen at certain resolutions causes bottom bar to overflow. This only affects Title Bar Style: Custom, I'm using the Default Dark+ theme, in case it's potentially caused by that.
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: