Commit 3adf4a48 authored by Alex Samorukov's avatar Alex Samorukov
Browse files

Fix plugin focus issues on osx

GTK/OSX does not automatically assign focus to the new windows (upstream 
issue), so activateIgnoringOtherApps is called. However, if it is called 
before gtk initialized it may cause number of focus issues.
parent ee05ada0
......@@ -80,7 +80,9 @@ static void gimp_ui_draw_pixbuf_layout (GtkStyle *style,
gint x,
gint y,
PangoLayout *layout);
static void gimp_osx_focus_window (void);
static gboolean gimp_ui_initialized = FALSE;
......@@ -182,7 +184,7 @@ gimp_ui_init (const gchar *prog_name,
gimp_dialogs_show_help_button (gimp_show_help_button ());
[NSApp activateIgnoringOtherApps:YES];
g_idle_add ((GSourceFunc) gimp_osx_focus_window, NULL);
gimp_ui_fix_pixbuf_style ();
......@@ -492,3 +494,11 @@ gimp_ui_draw_pixbuf_layout (GtkStyle *style,
if (area)
gdk_gc_set_clip_rectangle (gc, NULL);
static void
gimp_osx_focus_window (void)
[NSApp activateIgnoringOtherApps:YES];
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