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.
This commit is contained in:
Michael Natterer 2012-11-13 00:45:45 +01:00
parent 540fe91220
commit 83de53ee4d
2 changed files with 34 additions and 8 deletions

View File

@ -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)
-DSTANDALONE=0 \
-DUSE_INTERFACE=1 \
-DUSE_STRLWR=0
AM_LDFLAGS = $(mwindows)
INCLUDES = \
-I$(top_srcdir) \
$(GTK_CFLAGS) \
$(GEGL_CFLAGS) \
-I$(includedir) \
$(xobjective_c)
AM_LDFLAGS = \
$(mwindows) \
$(framework_cocoa)
SUBDIRS = tinyscheme ftx scripts

View File

@ -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;
}