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

Maximizing window on Windows positions it slightly off screen #1202

Closed
niik opened this issue Apr 13, 2017 · 5 comments
Closed

Maximizing window on Windows positions it slightly off screen #1202

niik opened this issue Apr 13, 2017 · 5 comments
Assignees

Comments

@niik
Copy link
Member

niik commented Apr 13, 2017

This is out title bar when window is not maximized

image

Make note of the margin between the top of the app icon and the window edge

This is the same title bar when the app is maximized

image

Calling getPosition on the BrowserWindow instance seems to indicate that we're positioned 8px to the left and 8px above from the screen top left edge

image

The size is also wrong

image

On my monitor the size of a maximized window should be 2560x1400 (full width and -40px to account for the Windows task bar) but it seems to be 16px too large both on the x and y axis.

There's a 16px magic number in the electron code base that I suspect might have something to do with it but it could just be a coincidence as well.

cc @kevinsawicki, this seems to be a problem with electron, I'm gonna see if I can make a small reproduction repository and then open an issue on Electron

@joshaber
Copy link
Contributor

I think this is electron/electron#8728 whose fix just landed: electron/electron#9167

@niik
Copy link
Member Author

niik commented Apr 13, 2017

image

sigh, 10 seconds after I submitted electron/electron#9184 😢

@joshaber
Copy link
Contributor

https://github.com/electron/electron/releases/tag/v1.6.7 is out which should have the fix.

@shiftkey shiftkey self-assigned this Apr 19, 2017
@shiftkey
Copy link
Member

Testing this with 1.6.7 looks better when maximized:

Here's the same console output that @niik used to troubleshoot - I gather the [-7,-7] position when maximized is fine and represents the 7px margin around the whole window, but I'll defer to @niik.

And [${screen.width}, ${screen.height}] returns "[1440, 900]" which would represent the start menu that we can't draw underneath.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 23, 2018
@desktop desktop unlocked this conversation Sep 27, 2018
@bebekpekiwan
Copy link

Hi, I got the same problem with my windows 10 file explorer. I'm not familiar to programming, can anyone help me to solve this step by step? its a minor issue but it really bothering me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants