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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4217,8 +4217,14 @@ gtk_window_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
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 @@ gtk_window_size_allocate (GtkWidget *widget,
|
||||
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 @@ gtk_window_size_allocate (GtkWidget *widget,
|
||||
NULL);
|
||||
|
||||
if (resizable_background)
|
||||
gtk_widget_queue_draw (widget);
|
||||
gdk_window_invalidate_rect (widget->window, NULL, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user