[gimp] Bug 677776 - filter popup windows get hidden behind main image window



commit 83de53ee4de56c41694b7196345586e8f6578d23
Author: Michael Natterer <mitch gimp org>
Date:   Tue Nov 13 00:45:45 2012 +0100

    Bug 677776 - filter popup windows get hidden behind main image window
    
    Apply modified patch from Simone Karin Lehmann which makes sure
    script-fu gets properly hidden after the dialog is done.

 plug-ins/script-fu/Makefile.am           |   26 ++++++++++++++++++--------
 plug-ins/script-fu/script-fu-interface.c |   16 ++++++++++++++++
 2 files changed, 34 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/script-fu/Makefile.am b/plug-ins/script-fu/Makefile.am
index 9a388c8..e8352e5 100644
--- a/plug-ins/script-fu/Makefile.am
+++ b/plug-ins/script-fu/Makefile.am
@@ -1,5 +1,10 @@
 ## Process this file with automake to produce Makefile.in
 
+if PLATFORM_OSX
+xobjective_c = "-xobjective-c"
+framework_cocoa = -framework Cocoa
+endif
+
 if OS_WIN32
 mwindows = -mwindows
 WINSOCK_LIBS = -lws2_32
@@ -24,15 +29,20 @@ script_fu_RC = script-fu.rc.o
 endif
 
 AM_CFLAGS = \
-	-DSTANDALONE=0     \
-	-DUSE_INTERFACE=1  \
-	-DUSE_STRLWR=0     \
-	-I$(top_srcdir)    \
-	$(GTK_CFLAGS)      \
-	$(GEGL_CFLAGS)     \
-	-I$(includedir)
-
-AM_LDFLAGS = $(mwindows)
+	-DSTANDALONE=0		\
+	-DUSE_INTERFACE=1	\
+	-DUSE_STRLWR=0
+
+INCLUDES = \
+	-I$(top_srcdir)	\
+	$(GTK_CFLAGS)	\
+	$(GEGL_CFLAGS)	\
+	-I$(includedir)	\
+	$(xobjective_c)
+
+AM_LDFLAGS = \
+	$(mwindows)	\
+	$(framework_cocoa)
 
 SUBDIRS = tinyscheme ftx scripts
 
diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c
index 053c637..b94571f 100644
--- a/plug-ins/script-fu/script-fu-interface.c
+++ b/plug-ins/script-fu/script-fu-interface.c
@@ -22,6 +22,10 @@
 #include <libgimp/gimp.h>
 #include <libgimp/gimpui.h>
 
+#ifdef GDK_WINDOWING_QUARTZ
+#import <Cocoa/Cocoa.h>
+#endif
+
 #include "tinyscheme/scheme-private.h"
 #include "scheme-wrapper.h"
 
@@ -737,11 +741,23 @@ script_fu_response (GtkWidget *widget,
       gtk_widget_set_sensitive (action_area, FALSE);
 
       script_fu_ok (script);
+
+#ifdef GDK_WINDOWING_QUARTZ
+      [NSApp hide: nil];
+      while (g_main_context_pending (NULL))
+        g_main_context_iteration (NULL, TRUE);
+#endif
       gtk_widget_destroy (sf_interface->dialog);
       break;
 
     default:
       sf_status = GIMP_PDB_CANCEL;
+
+#ifdef GDK_WINDOWING_QUARTZ
+      [NSApp hide: nil];
+      while (g_main_context_pending (NULL))
+        g_main_context_iteration (NULL, TRUE);
+#endif
       gtk_widget_destroy (sf_interface->dialog);
       break;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]