1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
From d43a84424361bcf8657459b6e2023b513322414d Mon Sep 17 00:00:00 2001
From: Chenthill Palanisamy <pchenthill@novell.com>
Date: Wed, 09 Jun 2010 06:57:32 +0000
Subject: Bug #344076 - Crash after closing an inline view of text attachment
---
diff --git a/gtkhtml/htmlembedded.c b/gtkhtml/htmlembedded.c
index 7b618dd..730fde8 100644
--- a/gtkhtml/htmlembedded.c
+++ b/gtkhtml/htmlembedded.c
@@ -75,22 +75,23 @@ draw (HTMLObject *o,
return;
if (element->parent) {
+ GtkWidget *parent;
new_x = o->x + tx;
new_y = o->y + ty - o->ascent;
- if (gtk_widget_get_parent (element->widget)) {
+ if ((parent = gtk_widget_get_parent (element->widget))) {
if (new_x != element->abs_x || new_y != element->abs_y) {
d (printf ("element: %p moveto: %d,%d shown: %d\n", element, new_x, new_y, GTK_WIDGET_VISIBLE (element->widget)));
- gtk_layout_move (GTK_LAYOUT(element->parent), element->widget, new_x, new_y);
- } else if (!GTK_HTML (element->parent)->engine->expose)
+ gtk_layout_move (GTK_LAYOUT(parent), element->widget, new_x, new_y);
+ } else if (!GTK_HTML (parent)->engine->expose)
gtk_widget_queue_draw (element->widget);
}
element->abs_x = new_x;
element->abs_y = new_y;
- if (!gtk_widget_get_parent (element->widget)) {
- d (printf ("element: %p put: %d,%d shown: %d\n", element, new_x, new_y, GTK_WIDGET_VISIBLE (element->widget)));
+ if (!parent) {
+ d(printf ("element: %p put: %d,%d shown: %d\n", element, new_x, new_y, GTK_WIDGET_VISIBLE (element->widget)));
gtk_layout_put (GTK_LAYOUT(element->parent), element->widget, new_x, new_y);
}
}
--
cgit v0.8.3.1
|