From 656e99faf5240ae2a25742d8579cf9243d5819b3 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 1 May 2010 18:02:42 +0200 Subject: [PATCH] app: clean up and simplify gimp_display_shell_canvas_expose() --- app/display/gimpdisplayshell-callbacks.c | 28 +++++++++--------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c index 310715aba2..57e1844024 100644 --- a/app/display/gimpdisplayshell-callbacks.c +++ b/app/display/gimpdisplayshell-callbacks.c @@ -380,27 +380,19 @@ gimp_display_shell_canvas_expose (GtkWidget *widget, return TRUE; /* ignore events on overlays */ - if (eevent->window != gtk_widget_get_window (widget)) - return FALSE; - - if (gimp_display_get_image (shell->display)) + if (eevent->window == gtk_widget_get_window (widget)) { - gimp_display_shell_canvas_expose_image (shell, eevent); - - /* Return TRUE here to avoid redrawing the image when it gets the - * keyboard focus. - */ - return FALSE; /* TRUE; */ + if (gimp_display_get_image (shell->display)) + { + gimp_display_shell_canvas_expose_image (shell, eevent); + } + else + { + gimp_display_shell_canvas_expose_drop_zone (shell, eevent); + } } - else - { - gimp_display_shell_canvas_expose_drop_zone (shell, eevent); - /* Return FALSE here so that the drag indicator is drawn around - * the empty canvas during DND operations. - */ - return FALSE; - } + return FALSE; } static void