From: Kevin Ollivier Date: Fri, 13 Nov 2009 02:28:16 +0000 (+0000) Subject: Override default handling so that we can position windows off-screen like on other... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0bcac6c79fcda4e3539cb60a7896c75c2ade6ff2 Override default handling so that we can position windows off-screen like on other ports. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index b0af31cc07..e5e031a604 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -88,6 +88,7 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector wxNonOwnedWindowCocoaImpl* impl; } +- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen; - (void)setImplementation: (wxNonOwnedWindowCocoaImpl *) theImplementation; - (wxNonOwnedWindowCocoaImpl*) implementation; - (void)noResponderFor: (SEL) selector; @@ -95,6 +96,13 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector @implementation wxNSWindow +// The default implementation always moves the window back onto the screen, +// even when the programmer explicitly wants to hide it. +- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen +{ + return frameRect; +} + - (void)setImplementation: (wxNonOwnedWindowCocoaImpl *) theImplementation { impl = theImplementation;