1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Made sure the monitor list is sorted correctly on win32.

This commit is contained in:
jules 2014-02-21 14:40:09 +00:00
parent 9cb86df630
commit fec71a645b

View file

@ -3210,6 +3210,11 @@ void Desktop::Displays::findDisplays (float masterScale)
if (monitors.size() == 0)
monitors.add (MonitorInfo (rectangleFromRECT (getWindowRect (GetDesktopWindow())), true));
// make sure the first in the list is the main monitor
for (int i = 1; i < monitors.size(); ++i)
if (monitors.getReference(i).isMain)
monitors.swap (i, 0);
RECT workArea;
SystemParametersInfo (SPI_GETWORKAREA, 0, &workArea, 0);