[evolution-patches] Re: [gtkhtml] #67707 embedded widget not drawn on initial expose (invitations in evo)



better/cleaner fix attached
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2046
diff -u -p -r1.2046 ChangeLog
--- ChangeLog	8 Oct 2004 13:21:38 -0000	1.2046
+++ ChangeLog	11 Oct 2004 14:42:15 -0000
@@ -1,3 +1,11 @@
+2004-10-11  Radek Doulik  <rodo ximian com>
+
+	* gtkhtml.c (gtk_html_size_request): make sure we keep layout in
+	the same state as before we were called (scrolled window may issue
+	additional size request after widget was already allocated)
+
+	Fixes #67707
+
 2004-10-08  Radek Doulik  <rodo ximian com>
 
 	* htmltext.c (html_text_remove_unwanted_line_breaks): added "$+?"
Index: gtkhtml.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/gtkhtml.c,v
retrieving revision 1.576
diff -u -p -r1.576 gtkhtml.c
--- gtkhtml.c	23 Sep 2004 18:43:01 -0000	1.576
+++ gtkhtml.c	11 Oct 2004 14:42:16 -0000
@@ -1036,11 +1036,20 @@ static void
 gtk_html_size_request (GtkWidget *widget, GtkRequisition *requisition)
 {
 	HTMLEngine *e = GTK_HTML (widget)->engine;
-
 	if (!e->writing) {
+		int old_width, old_height;
+
+		old_width = e->width;
+		old_height = e->height;
 		e->width = requisition->width;
 		e->height = requisition->height;
 		html_engine_calc_size (e, NULL);
+		requisition->width = html_engine_get_doc_width (e);
+		requisition->height = html_engine_get_doc_height (e);
+		e->width = old_width;
+		e->height = old_height;
+		html_engine_calc_size (e, NULL);
+	} else {
 		requisition->width = html_engine_get_doc_width (e);
 		requisition->height = html_engine_get_doc_height (e);
 	}


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