]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/nonownedwnd.mm
Make public headers compatible with Objective-C++ with ARC.
[wxWidgets.git] / src / osx / cocoa / nonownedwnd.mm
index 3901a71c69475eca62ecd2e41845b8172ea49d83..9e79c6a458e45b250d746b9802a6b8d1d242ea57 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      DavidStefan Csomor
 // Modified by:
 // Created:     2008-06-20
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -659,7 +658,7 @@ long style, long extraStyle, const wxString& WXUNUSED(name) )
     // If the parent is modal, windows with wxFRAME_FLOAT_ON_PARENT style need
     // to be in kCGUtilityWindowLevel and not kCGFloatingWindowLevel to stay
     // above the parent.
-    wxDialog * const parentDialog = wxDynamicCast(parent, wxDialog);
+    wxDialog * const parentDialog = parent == NULL ? NULL : wxDynamicCast(parent->MacGetTopLevelWindow(), wxDialog);
     if (parentDialog && parentDialog->IsModal())
     {
         if (level == kCGFloatingWindowLevel)
@@ -1035,16 +1034,6 @@ void wxNonOwnedWindowCocoaImpl::WindowToScreen( int *x, int *y )
         *y = p.y;
 }
 
-double wxNonOwnedWindowCocoaImpl::GetMagnificationFactor() const
-{
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
-    if ( [ m_macWindow respondsToSelector:@selector(backingScaleFactor) ] )
-        return [m_macWindow backingScaleFactor];
-    else
-#endif
-    return 1.0;
-}
-
 bool wxNonOwnedWindowCocoaImpl::IsActive()
 {
     return [m_macWindow isKeyWindow];