OW 191: overwolf.windows.obtainDeclaredWindow window object positions are not correct with dpi scaling

Issue Description:
Example:

  • DPI scaling is set to 125%
  • a window is positioned on the secondary screen at x: -1920 y: 0
  • We receive the window overwolf.windows.obtainDeclaredWindow
    => the window object we get will have x: -2400 y:0 as the coordinates

Note: the scaling of both monitors need to be set to 125%. If the main monitor has a scaling of 100% the x value will be 1930

The question here is: is this a bug or expected behaviour?
If we just store the values and then at a later point pass those into changePosition API, the window will be positioned wrongly, as that API takes DPI into account.

Impact for my app: mid to high
Do you have a workaround:
WE’re unsure if this is something we need to fix or if it’s not working as expected in the overwolf API

We return the size/position with DPI conversion.
(calling changePosition expects NO DPI coordinates)
This is an inconsistent behavior on our end and we are improving it with the new API we are working on.
We’ll update the documentations on the docs site asap.
I suggest you conver the positions back to non-DPI values for now.

@EladBahar well…then there is another curious thing happening.

If you have 100% scaling on one monitor and 125% on the second one, you get the non-dpi converted value.
What monitor is used for deciding if there is a conversion or not?

Dpeneds, is that for Native window or taranspent (OFFscreen) window?

native window

ok, so it is using the main monitor DPI.
it is totaly worng,
we will add new paramets to the callback with the ture x,y,width,high…
somthing like logicalBounds {x,y,width,height}