hoppfrosch / WindowPadX

Enhancements on original WindowPad (by Lexikos)
http://hoppfrosch.github.com/WindowPadX
224 stars 42 forks source link

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

Open johannes-z opened 8 years ago

johannes-z commented 8 years ago

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 commented 8 years ago

+1

denolfe commented 8 years ago

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 commented 8 years ago

Can we adapt this into the WPXA_Move function?

fredkilbourn commented 8 years ago

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

dontgetfoundout commented 7 years ago

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 commented 5 years ago

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.