Browse Source

Made sure the monitor list is sorted correctly on win32.

tags/2021-05-28
jules 11 years ago
parent
commit
fec71a645b
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 5
- 0
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -3210,6 +3210,11 @@ void Desktop::Displays::findDisplays (float masterScale)
if (monitors.size() == 0) if (monitors.size() == 0)
monitors.add (MonitorInfo (rectangleFromRECT (getWindowRect (GetDesktopWindow())), true)); 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; RECT workArea;
SystemParametersInfo (SPI_GETWORKAREA, 0, &workArea, 0); SystemParametersInfo (SPI_GETWORKAREA, 0, &workArea, 0);


Loading…
Cancel
Save