From ef78a4310bb2cfdffa4f4de8210ab8acc02840b8 Mon Sep 17 00:00:00 2001 From: "blizzard%appliedtheory.com" Date: Sat, 24 Oct 1998 17:02:34 +0000 Subject: [PATCH] Catch the "draw" event on the GtkFixed widget and redraw the html area since it's just been erased by the widget default draw handler git-svn-id: svn://10.0.0.236/trunk@13415 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/gnomefe/gnome-src/g-html-view.c | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/mozilla/cmd/gnomefe/gnome-src/g-html-view.c b/mozilla/cmd/gnomefe/gnome-src/g-html-view.c index 3aea75ce056..2503e2abe13 100644 --- a/mozilla/cmd/gnomefe/gnome-src/g-html-view.c +++ b/mozilla/cmd/gnomefe/gnome-src/g-html-view.c @@ -68,6 +68,11 @@ html_view_size_allocate(GtkWidget *widget, GtkAllocation *alloc, void *data); +static gint +html_view_draw(GtkWidget *widget, + GdkRectangle *area, + void *data); + static gint html_view_realize_handler(GtkWidget *widget, void *data) @@ -105,9 +110,33 @@ html_view_realize_handler(GtkWidget *widget, printf("connecting size_realloc to context %x\n", context); gtk_signal_connect(GTK_OBJECT(MOZ_VIEW(view)->subview_parent), "size_allocate", GTK_SIGNAL_FUNC(html_view_size_allocate), context); + gtk_signal_connect(GTK_OBJECT(MOZ_VIEW(view)->subview_parent), "draw", + GTK_SIGNAL_FUNC(html_view_draw), context); return TRUE; } +static gint +html_view_draw(GtkWidget *widget, + GdkRectangle *area, + void *data) +{ + MWContext *context = (MWContext *)data; + MozHTMLView *view = NULL; + + if (!data) + return FALSE; + view = find_html_view(context); + if (!view) + return FALSE; + moz_html_view_refresh_rect(view, + area->x, + area->y, + area->width, + area->height); + /* let any other draws work too */ + return FALSE; +} + static gint html_view_handle_pointer_motion_part2(MWContext *context, LO_Element *element, int32 event, void *closure, ETEventStatus status)