Browse Source

Fixed a few windowing issues when using global scale factors.

tags/2021-05-28
jules 11 years ago
parent
commit
4af1478dfb
3 changed files with 6 additions and 6 deletions
  1. +4
    -4
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp
  2. +1
    -1
      modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm
  3. +1
    -1
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 4
- 4
modules/juce_gui_basics/native/juce_linux_Windowing.cpp View File

@@ -1045,7 +1045,7 @@ public:
r = Desktop::getInstance().getDisplays().getMainDisplay().userArea;
if (! r.isEmpty())
setBounds (r, shouldBeFullScreen);
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, r), shouldBeFullScreen);
component.repaint();
}
@@ -1115,9 +1115,9 @@ public:
if (c == &component)
break;
// TODO: needs scaling correctly
if (c->contains (localPos + bounds.getPosition() - c->getScreenPosition()))
return false;
if (ComponentPeer* peer = c->getPeer())
if (peer->contains (localPos + bounds.getPosition() - peer->getBounds().getPosition(), true))
return false;
}
if (trueIfInAChildWindow)


+ 1
- 1
modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm View File

@@ -369,7 +369,7 @@ public:
// (can't call the component's setBounds method because that'll reset our fullscreen flag)
if (r != component.getBounds() && ! r.isEmpty())
setBounds (r, shouldBeFullScreen);
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, r), shouldBeFullScreen);
}
}
}


+ 1
- 1
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -763,7 +763,7 @@ public:
ShowWindow (hwnd, SW_SHOWNORMAL);
if (! boundsCopy.isEmpty())
setBounds (boundsCopy, false);
setBounds (ScalingHelpers::scaledScreenPosToUnscaled (component, boundsCopy), false);
}
else
{


Loading…
Cancel
Save