X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0ddf0ac6963d88f037320bcdfd3c36f007e760d6..0bcac6c79fcda4e3539cb60a7896c75c2ade6ff2:/src/osx/cocoa/nonownedwnd.mm 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;