[gtk+] Fix Quartz Full Screen Crash.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fix Quartz Full Screen Crash.
- Date: Mon, 22 Feb 2016 00:24:31 +0000 (UTC)
commit 46d3611052060cfbba7cbcae7b8ec68a41f011dd
Author: Allin Cottrell <cottrell wfu edu>
Date: Sun Feb 21 16:22:27 2016 -0800
Fix Quartz Full Screen Crash.
gdk/quartz/GdkQuartzNSWindow.c | 8 ++++++++
gdk/quartz/GdkQuartzView.c | 2 +-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/GdkQuartzNSWindow.c b/gdk/quartz/GdkQuartzNSWindow.c
index d485531..e45c632 100644
--- a/gdk/quartz/GdkQuartzNSWindow.c
+++ b/gdk/quartz/GdkQuartzNSWindow.c
@@ -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];
diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c
index cbd7fe5..780b5a3 100644
--- a/gdk/quartz/GdkQuartzView.c
+++ b/gdk/quartz/GdkQuartzView.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]