[gimp] app: clean up and simplify gimp_display_shell_canvas_expose()



commit 656e99faf5240ae2a25742d8579cf9243d5819b3
Author: Michael Natterer <mitch gimp org>
Date:   Sat May 1 18:02:42 2010 +0200

    app: clean up and simplify gimp_display_shell_canvas_expose()

 app/display/gimpdisplayshell-callbacks.c |   28 ++++++++++------------------
 1 files changed, 10 insertions(+), 18 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index 310715a..57e1844 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]