ConstrainWindowToScreenMBS Issue

I’ve got an odd problem with ConstrainWindowToScreenMBS. I’m trying to improve handling of my app when there are 2 monitors. The code uses an AppDelegate with the event ApplicationDidChangeScreenParameters to call this code:

for currentWindow as Integer = 0 to WindowCount - 1 dim theWindow as Window = Window(currentWindow) if theWindow.Visible then call theWindow.ConstrainWindowToScreenMBS(True) end if next

My screen has a resolution of 2560x1440. When I activate hiDPI on the screen the vertical resolution is 720 pixels. For the main window the resulting width is okay but the height is too high. It’s not the toolbar but a bit less:

The correct height would be like this:

Unfortunately, I can’t reproduce this in a simple example (http://www.mothsoftware.com/downloads/constrain.zip).

Any ideas what could cause the problem?

macOS 10.11 . MBS from 22.01.2018.

Let me check this.

For me, it works well.
I can’t find a problem here. Sorry.