Commit 3e78c674 authored by Alex Samorukov's avatar Alex Samorukov

Return FALSE on gimp_osx_focus_window to avoid endless loop

parent 0271f4c8
Pipeline #143857 passed with stages
in 30 minutes and 58 seconds
......@@ -97,10 +97,11 @@ gimp_init_icon_theme_for_testing (void)
}
#ifdef GDK_WINDOWING_QUARTZ
static void
gimp_osx_focus_window (void)
static gboolean
gimp_osx_focus_window (gpointer user_data)
{
[NSApp activateIgnoringOtherApps:YES];
return FALSE;
}
#endif
......@@ -142,7 +143,7 @@ gimp_init_for_gui_testing_internal (gboolean show_gui,
gimp_initialize (gimp, gimp_status_func_dummy);
gimp_restore (gimp, gimp_status_func_dummy, NULL);
#ifdef GDK_WINDOWING_QUARTZ
g_idle_add ((GSourceFunc) gimp_osx_focus_window, NULL);
g_idle_add (gimp_osx_focus_window, NULL);
#endif
return gimp;
......
......@@ -71,7 +71,7 @@ static gboolean gimp_window_set_transient_for (GtkWindow *window,
GdkWindow *parent);
#ifdef GDK_WINDOWING_QUARTZ
static void gimp_osx_focus_window (void);
static gboolean gimp_osx_focus_window (gpointer);
#endif
......@@ -168,7 +168,7 @@ gimp_ui_init (const gchar *prog_name)
gimp_dialogs_show_help_button (gimp_show_help_button ());
#ifdef GDK_WINDOWING_QUARTZ
g_idle_add ((GSourceFunc) gimp_osx_focus_window, NULL);
g_idle_add (gimp_osx_focus_window, NULL);
#endif
gimp_ui_initialized = TRUE;
......@@ -444,9 +444,10 @@ gimp_window_set_transient_for (GtkWindow *window,
}
#ifdef GDK_WINDOWING_QUARTZ
static void
gimp_osx_focus_window (void)
static gboolean
gimp_osx_focus_window (gpointer user_data)
{
[NSApp activateIgnoringOtherApps:YES];
return FALSE;
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment