Window opens on wrong display


#1

When I open a window from my application that is running on my second monitor running on MacOS 10.12 , the window opens on the primary display. How can I force the new window to open on the display where the main application is running? I can repro this with the demo app. Run the demo app on the second display and click Show Windows in the Windows demo and all windows open on the primary display. Same thing happens in demo app when I run the Dialog Boxes demo in non-native mode; Load File Browser windows all open on the primary instead of the display where the demo app is running.


#2

You can use the Component::getParentMonitorArea() method to get the bounds of the display that your main application window is in and then just position your new window relative to this.

Ed