From d3ff5d9c4bbabeab33d52a87599115d81f021cc3 Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Mon, 16 Nov 2009 16:50:10 +0000 Subject: [PATCH] Fixed a problem with RTAS plugin window position in certain dual-monitor setups --- extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm b/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm index c17c44075c..5696275199 100644 --- a/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm +++ b/extras/audio plugins/wrapper/RTAS/juce_RTAS_MacUtilities.mm @@ -69,13 +69,13 @@ void* attachSubWindow (void* hostWindowRef, Component* comp) GetWindowBounds ((WindowRef) hostWindowRef, kWindowContentRgn, &winBounds); NSRect w = [hostWindow frame]; w.origin.x = winBounds.left; - w.origin.y = [[NSScreen mainScreen] frame].size.height - winBounds.bottom; + w.origin.y = [[hostWindow screen] frame].size.height - winBounds.bottom; [hostWindow setFrame: w display: NO animate: NO]; } #endif NSPoint windowPos = [hostWindow convertBaseToScreen: f.origin]; - windowPos.y = [[NSScreen mainScreen] frame].size.height - (windowPos.y + f.size.height); + windowPos.y = [[hostWindow screen] frame].size.height - (windowPos.y + f.size.height); comp->setTopLeftPosition ((int) windowPos.x, (int) windowPos.y);