[gimp] Bug 776294 - Screenshot buttons cannot be clicked
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 776294 - Screenshot buttons cannot be clicked
- Date: Wed, 28 Dec 2016 15:34:25 +0000 (UTC)
commit 7c35d75bf9e540408eb3a6b835f31d82a49d07b1
Author: Kristian Rietveld <kris loopnest org>
Date: Wed Dec 28 16:12:33 2016 +0100
Bug 776294 - Screenshot buttons cannot be clicked
Disable the new "automatic window tabbing" feature introduced on macOS
Sierra. It breaks GTK+ applications and we would need proper support for
this in GTK+ if we want to use it.
app/gui/gui.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/app/gui/gui.c b/app/gui/gui.c
index 2302654..469a024 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -78,9 +78,21 @@
#include "session.h"
#include "splash.h"
#include "themes.h"
+
#ifdef GDK_WINDOWING_QUARTZ
#import <AppKit/AppKit.h>
#include <gtkosxapplication.h>
+
+/* Forward declare since we are building against old SDKs. */
+#if !defined(MAC_OS_X_VERSION_10_12) || \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12
+
+@interface NSWindow(ForwardDeclarations)
++ (void)setAllowsAutomaticWindowTabbing:(BOOL)allow;
+@end
+
+#endif
+
#endif /* GDK_WINDOWING_QUARTZ */
#include "gimp-intl.h"
@@ -247,6 +259,17 @@ gui_init (Gimp *gimp,
/* disable automatic startup notification */
gtk_window_set_auto_startup_notification (FALSE);
+#ifdef GDK_WINDOWING_QUARTZ
+ /* Before the first window is created (typically the splash window),
+ * we need to disable automatic tabbing behavior introduced on Sierra.
+ * This is known to cause all kinds of weird issues (see for instance
+ * Bugzilla #776294) and needs proper GTK+ support if we would want to
+ * enable it.
+ */
+ if ([NSWindow respondsToSelector:@selector(setAllowsAutomaticWindowTabbing:)])
+ [NSWindow setAllowsAutomaticWindowTabbing:NO];
+#endif /* GDK_WINDOWING_QUARTZ */
+
gimp_dnd_init (gimp);
themes_init (gimp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]