]> git.saurik.com Git - wxWidgets.git/commitdiff
Override default handling so that we can position windows off-screen like on other...
authorKevin Ollivier <kevino@theolliviers.com>
Fri, 13 Nov 2009 02:28:16 +0000 (02:28 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Fri, 13 Nov 2009 02:28:16 +0000 (02:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/nonownedwnd.mm

index b0af31cc070e3306d1da6fc9994b8797849bce47..e5e031a6046bf90a7a4ed9bd7bbebd6fcbe01382 100644 (file)
@@ -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;