Main window coordinates not correct when using getDesktopScaleFactor() <> 1

I noticed a behaviour, which i can’t explain (Windows)…

I have a standalone app and I wan’t to scale its main window, so I am overriding getDesktopScaleFactor() method:
float getDesktopScaleFactor() const override { return 1.2f; }

When i check main window coordinates using:

mainWindow->getPosition();
mainWindow->getScreenPosition();

,i can see that coordinates don’t match. I am not using any system scaling on my monitor.

  1. getScreenPosition() is giving me 20% increased coordinates (792, 384), which reflect the actual position of the window displayed
  2. getPosition() is giving me the coordinates (660, 320), where the window should be initially positioned (but it’s not) and this information definitively doesn’t reflect displayed window position.

Can anyone shed a light on this? I would expect coordinates from both methods to be the same (regardless of main window scaling) and window should be positioned at desired position (660,320), as is the case if scale factor is 1.0f).

In any case, the main question is how (method?) to display a window at (660, 320), because getPosition() is already returning those coordinates.

Thank you!