]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/nonownedwnd.mm
Override default handling so that we can position windows off-screen like on other...
[wxWidgets.git] / 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;