From ded9a6c3dffbbd22fd1feabc3ac9d8a61e9c2cf1 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Thu, 27 Mar 2008 12:22:23 +0000 Subject: [PATCH] don't flush if there's no image. (gimp_display_shell_dnd_flush): use 2008-03-27 Sven Neumann * app/display/gimpdisplayshell-dnd.c (gimp_display_shell_drop_uri_list): don't flush if there's no image. (gimp_display_shell_dnd_flush): use gtk_window_present() instead of gdk_window_focus(). svn path=/trunk/; revision=25261 --- ChangeLog | 7 +++++++ app/display/gimpdisplayshell-dnd.c | 9 +++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a53525bbad..ffa3016beb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-27 Sven Neumann + + * app/display/gimpdisplayshell-dnd.c + (gimp_display_shell_drop_uri_list): don't flush if there's no image. + (gimp_display_shell_dnd_flush): use gtk_window_present() instead of + gdk_window_focus(). + 2008-03-27 Sven Neumann * app/display/gimpstatusbar.c: use a button with icon for the diff --git a/app/display/gimpdisplayshell-dnd.c b/app/display/gimpdisplayshell-dnd.c index f623b08a16..4c210af839 100644 --- a/app/display/gimpdisplayshell-dnd.c +++ b/app/display/gimpdisplayshell-dnd.c @@ -161,11 +161,7 @@ static void gimp_display_shell_dnd_flush (GimpDisplayShell *shell, GimpImage *image) { - if (GTK_WIDGET_DRAWABLE (shell)) - { - gdk_window_focus (GTK_WIDGET (shell)->window, - gtk_get_current_event_time ()); - } + gtk_window_present (GTK_WINDOW (shell)); gimp_image_flush (image); @@ -484,7 +480,8 @@ gimp_display_shell_drop_uri_list (GtkWidget *widget, } } - gimp_display_shell_dnd_flush (shell, image); + if (image) + gimp_display_shell_dnd_flush (shell, image); } static void