app: clean up and simplify gimp_display_shell_canvas_expose()

This commit is contained in:
Michael Natterer 2010-05-01 18:02:42 +02:00
parent 1833a6eaa1
commit 656e99faf5
1 changed files with 10 additions and 18 deletions

View File

@ -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