Fix Quartz Full Screen Crash.

This commit is contained in:
Allin Cottrell 2016-02-21 16:22:27 -08:00 committed by John Ralls
parent 3cf98a4353
commit 46d3611052
2 changed files with 9 additions and 1 deletions

View File

@ -23,6 +23,14 @@
@implementation GdkQuartzNSWindow
- (void)windowWillClose:(NSNotification*)notification
{
// Clears the delegate when window is going to be closed; since EL
// Capitan it is possible that the methods of delegate would get
// called after the window has been closed.
[self setDelegate:nil];
}
-(BOOL)windowShouldClose:(id)sender
{
GdkWindow *window = [[self contentView] gdkWindow];

View File

@ -662,7 +662,7 @@
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
NSRect rect;
if (!impl->toplevel)
if (!impl || !impl->toplevel)
return;
if (trackingRect)