[gimp/gimp-2-8] Bug 776294 - Screenshot buttons cannot be clicked
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 776294 - Screenshot buttons cannot be clicked
- Date: Wed, 28 Dec 2016 15:47:13 +0000 (UTC)
commit 67ac4fa028e07da940e85fa47e41eec96c21f687
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.
(cherry picked from commit 7c35d75bf9e540408eb3a6b835f31d82a49d07b1)
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 1380b60..d7efb20 100644
--- a/app/gui/gui.c
+++ b/app/gui/gui.c
@@ -76,9 +76,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"
@@ -227,6 +239,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]