From 9ee0c77a74e4d19ee914f144e53fcfedae8cdf8b Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 16 Apr 2000 00:39:00 +0000 Subject: Add realize. (e_canvas_realize): Set the back pixmap to NULL to reduce 2000-04-16 Anders Carlsson * e-canvas.c (e_canvas_class_init): Add realize. (e_canvas_realize): Set the back pixmap to NULL to reduce flicker. svn path=/trunk/; revision=2456 --- e-util/ChangeLog | 5 +++++ e-util/e-canvas.c | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index f181bc8424..4cba63be98 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,8 @@ +2000-04-16 Anders Carlsson + + * e-canvas.c (e_canvas_class_init): Add realize. + (e_canvas_realize): Set the back pixmap to NULL to reduce flicker. + 2000-04-14 Christopher James Lahey * e-xml-utils.c: Fixing a warning. diff --git a/e-util/e-canvas.c b/e-util/e-canvas.c index 704b6ca12b..ad0819e3dd 100644 --- a/e-util/e-canvas.c +++ b/e-util/e-canvas.c @@ -23,14 +23,15 @@ #include #include "e-canvas.h" static void e_canvas_init (ECanvas *card); -static void e_canvas_class_init (ECanvasClass *klass); +static void e_canvas_class_init (ECanvasClass *klass); +static void e_canvas_realize (GtkWidget *widget); static gint e_canvas_key (GtkWidget *widget, GdkEventKey *event); static gint e_canvas_focus_in (GtkWidget *widget, - GdkEventFocus *event); + GdkEventFocus *event); static gint e_canvas_focus_out (GtkWidget *widget, - GdkEventFocus *event); + GdkEventFocus *event); static int emit_event (GnomeCanvas *canvas, GdkEvent *event); @@ -85,7 +86,8 @@ e_canvas_class_init (ECanvasClass *klass) widget_class->key_release_event = e_canvas_key; widget_class->focus_in_event = e_canvas_focus_in; widget_class->focus_out_event = e_canvas_focus_out; - + widget_class->realize = e_canvas_realize; + klass->reflow = NULL; e_canvas_signals [REFLOW] = @@ -331,6 +333,14 @@ e_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event) return FALSE; } +static void +e_canvas_realize (GtkWidget *widget) +{ + if (GTK_WIDGET_CLASS (parent_class)->realize) + (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); + + gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window, NULL, FALSE); +} static void e_canvas_item_invoke_reflow (GnomeCanvasItem *item, int flags) -- cgit