[gimp/gtk3-port: 54/227] app: port to GtkWidget::draw() (incompletely)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 54/227] app: port to GtkWidget::draw() (incompletely)
- Date: Mon, 10 Feb 2014 21:57:34 +0000 (UTC)
commit 306f98a73eb70549e1f0b4657f58f1e23e609681
Author: Michael Natterer <mitch gimp org>
Date: Tue Oct 19 20:00:10 2010 +0200
app: port to GtkWidget::draw() (incompletely)
app/display/gimpdisplayshell-callbacks.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-callbacks.c b/app/display/gimpdisplayshell-callbacks.c
index a99d32a..a25beea 100644
--- a/app/display/gimpdisplayshell-callbacks.c
+++ b/app/display/gimpdisplayshell-callbacks.c
@@ -211,23 +211,17 @@ gimp_display_shell_canvas_size_allocate (GtkWidget *widget,
}
gboolean
-gimp_display_shell_canvas_expose (GtkWidget *widget,
- GdkEventExpose *eevent,
- GimpDisplayShell *shell)
+gimp_display_shell_canvas_draw (GtkWidget *widget,
+ cairo_t *cr,
+ GimpDisplayShell *shell)
{
/* are we in destruction? */
if (! shell->display || ! gimp_display_get_shell (shell->display))
return TRUE;
/* ignore events on overlays */
- if (eevent->window == gtk_widget_get_window (widget))
+ if (gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget)))
{
- cairo_t *cr;
-
- cr = gdk_cairo_create (gtk_widget_get_window (shell->canvas));
- gdk_cairo_region (cr, eevent->region);
- cairo_clip (cr);
-
if (gimp_display_get_image (shell->display))
{
gimp_display_shell_canvas_draw_image (shell, cr);
@@ -236,8 +230,6 @@ gimp_display_shell_canvas_expose (GtkWidget *widget,
{
gimp_display_shell_canvas_draw_drop_zone (shell, cr);
}
-
- cairo_destroy (cr);
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]