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

[Bug] Windows 10 - Gap because of borders #14

Open
johannes-z opened this issue Dec 13, 2015 · 6 comments
Open

[Bug] Windows 10 - Gap because of borders #14

johannes-z opened this issue Dec 13, 2015 · 6 comments

Comments

@johannes-z
Copy link

The borders seem to be wrongly calculated for Windows 10. Since Windows 10 has no visual borders anymore, there now is a gap of a few pixels.

@DoCode
Copy link

DoCode commented Jul 29, 2016

+1

@denolfe
Copy link
Contributor

denolfe commented Aug 10, 2016

Ran into this today. I may have a look sometime soon. However, another project called Gridy has compensated for the invisible borders in Windows 10 per this conversation and this commit

@DoCode
Copy link

DoCode commented Aug 10, 2016

Can we adapt this into the WPXA_Move function?

@fredkilbourn
Copy link

Hey guys - if you have any good knowledge to pass on after figuring it out the aforementioned conversation could use some :)

@dontgetfoundout
Copy link

This appears to be working (in the basic scenarios that I tried):

In the WPXA_Move() method, add the following lines after both calls to "gosub wp_CalcNewSizeAndPosition":

newx -= 8
neww += 16
newh += 8

I wasn't able to get it to work properly by moving the size/position adjustments into the wp_CalcNewSizeAndPosition and wp_CalcNewPosition subs directly, but someone with more experience with AHK and WindowPadX might have more success.

@ghost
Copy link

ghost commented Jun 1, 2019

2019 and just discovered WindowPadX. Ran into a problem immediately with this issue. WPX moves the windows around wonderfully, but after closing them and reopening, they are offset away from their WPX positions due to this Win10 goofy border. This causes slight overlaps and unexpected behavior (ie. the first move of a window using WPX will be to move it a few pixels back into place). I see there was a fix committed in 2017. But it didn't fix this problem and probably made it so dontgetfoundout's solution doesn't work as it once did.

dontgetfoundout's solution did not work for me, but a modification of it along with a change to the .ini file did. Firstly, the values I needed were:

newx += 7
neww -= 14
newh -= 7

This fixed the corner positioning of the moved windows to not be considered off screen when accounting for the borders. However, this left a gutter of wasted space between left and right positioned windows, so...

Secondly, in the .ini file, I changed all of the horizontal scaled factors from 0.50 to 0.504. For example:

#Numpad4 = WPXA_Move, -1, 0, 0.504, 1.0

This eliminated the gutter and the windows position neatly for me now.

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

5 participants