Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

winmove in windows 10 misalignment


  • Please log in to reply
2 replies to this topic
shanefalcao
  • New members
  • 2 posts
  • Last active: Oct 09 2015 05:11 AM
  • Joined: 06 Oct 2015

Hi everyone,

 

After upgrading to windows 10, there is a misalignment of winmove.

 

For a start,

 

try winmove, 0,0

 

you would notice that the top left corner of the window is not exactly at the top left of the screen.

 

It is off by a few the pixels from the left.

 

The pixel offset is different for different applications, e.g. chrome & word 2016.

 

What I guess is that windows 10 is deliberately displacing windows to enable the sticky edges of windows to facilitate aero snap.

(I could be totally wrong)

 

I seek your help to deal with this offset.

 

 

 



Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

WinMove deals only with the window.  Essentially, the OS draws its own frames around each window that do not match up with the window itself.  It has done this ever since Windows Vista with the desktop window manager (a.k.a. Aero) enabled, but how much of a discrepancy you find depends on your current visual style and related settings.

 

There might be some code in WinGetPosEx that can help you.  At the very least, I suppose you could retrieve the "real" window position with WinGetPos and the "apparent" position with WinGetPosEx, and calculate from that the offset you need to use for WinMove.



shanefalcao
  • New members
  • 2 posts
  • Last active: Oct 09 2015 05:11 AM
  • Joined: 06 Oct 2015

Thanks Lexikos.

 

The information of getting offset is what I need.

 

I will work on WInGetPosEx to calculate the offset