Don't queue a redraw if the size didn't change. queue a shallow redraw.
2005-02-11 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c (gtk_window_size_allocate): Don't queue
a redraw if the size didn't change. queue a shallow redraw.
diff --git a/ChangeLog b/ChangeLog
index 8d80c4c..a648016 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-11 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Don't queue
+ a redraw if the size didn't change. queue a shallow redraw.
+
2005-02-10 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Add a resizable-background style property
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 8d80c4c..a648016 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2005-02-11 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Don't queue
+ a redraw if the size didn't change. queue a shallow redraw.
+
2005-02-10 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Add a resizable-background style property
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 8d80c4c..a648016 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
+2005-02-11 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkwindow.c (gtk_window_size_allocate): Don't queue
+ a redraw if the size didn't change. queue a shallow redraw.
+
2005-02-10 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwindow.c: Add a resizable-background style property
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 75e6e7d..72f15b6 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4217,8 +4217,14 @@
{
GtkWindow *window;
GtkAllocation child_allocation;
+ gboolean allocation_changed = FALSE;
window = GTK_WINDOW (widget);
+
+ if (allocation->width != widget->allocation.width ||
+ allocation->height != widget->allocation.height)
+ allocation_changed = TRUE;
+
widget->allocation = *allocation;
if (window->bin.child && GTK_WIDGET_VISIBLE (window->bin.child))
@@ -4240,7 +4246,7 @@
allocation->height + window->frame_top + window->frame_bottom);
}
- if (GTK_WIDGET_REALIZED (widget))
+ if (allocation_changed && GTK_WIDGET_REALIZED (widget))
{
gboolean resizable_background;
@@ -4249,7 +4255,7 @@
NULL);
if (resizable_background)
- gtk_widget_queue_draw (widget);
+ gdk_window_invalidate_rect (widget->window, NULL, FALSE);
}
}