Incorrect window size set

So it seems that the API may return a wrong result for a window’s height.
WindowDevicePixelRatio = just 1.0.

Here is me hovering the HTML window element, showing a 100 pixels height on screen:

Here is me running obtainDeclaredWindow in the log for that window:

So here is how it can be replicated using v.2.0.0.5 of HearthArena:

  • Make sure HearthArena is not running.
  • Start Hearthstone.
  • Make Hearthstone show in windowed mode.
  • Go to the Arena and have an arena run active where you picked your class.
  • Minimize Hearthstone.
  • Start HearthArena.
  • Restore the Hearthstone window.

Notice that I am setting this window to 60 pixels height (which declaredWindow also reflects, however the window shows as 100 pixels).

So calling the following once more:
overwolf.windows.obtainDeclaredWindow(‘arenaTracker’, ({ window: { id, width, height }}) => overwolf.windows.changeSize(id, width, 60 , console.log))

Fixes it…

Hey @heartharena,

Are you working with two screens? Is the DPI in both of the screens =100%?
Is there any display issue with the above, or does it not make sense but does not affect the app’s behavior?

Ya, both are just 100%.

Yes there is an issue, as you can see the window is height 100 pixels which in this case makes the UI element way too large. It should have been the 60px to which i set it.

1 Like

Hi @heartharena,

The default minimum size of a window is 100x100 pixels. If you want your window to be less than that (i.e., 60 pixels), please add in your manifest min_size of 0,0.

Would you mind testing and checking if it’s resolved your issue?

Thanks.