summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <mgouy@biomp2.univ-lyon1.fr>2019-01-04 17:50:58 +0100
committerManolo Gouy <mgouy@biomp2.univ-lyon1.fr>2019-01-04 17:50:58 +0100
commit2bc7816cab0b4a7f4cd88fe45829d901db6b04a9 (patch)
tree06c2331cf8daeb65bc0e8d7ffe58a158a3f708c8
parent38b8dfaaea55d20f7209199638dd44fe0161add2 (diff)
Slight reorganization of the [FLWindow close] method.
It might be safer to use the window's contentView before sending the close message to the window.
-rw-r--r--src/Fl_cocoa.mm8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 5bfeb390d..f8d84ef36 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -605,10 +605,6 @@ void Fl_Cocoa_Screen_Driver::breakMacEventLoop()
@implementation FLWindow
- (void)close
{
- [super close];
- // when a fullscreen window is closed, windowDidResize may be sent after the close message was sent
- // and before the FLWindow receives the final dealloc message
- w = NULL;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
if ([[self contentView] isMemberOfClass:[FLViewLayer class]]) {
FLViewLayer *view = (FLViewLayer*)[self contentView];
@@ -616,6 +612,10 @@ void Fl_Cocoa_Screen_Driver::breakMacEventLoop()
view->layer_data = NULL;
}
#endif
+ [super close];
+ // when a fullscreen window is closed, windowDidResize may be sent after the close message was sent
+ // and before the FLWindow receives the final dealloc message
+ w = NULL;
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint