Commit ab019f3a authored by Matthias Clasen's avatar Matthias Clasen

Avoid unnecessary redraws when resizing. Patch by Owen Taylor

        * gtk/gtkwindow.c: Avoid unnecessary redraws when resizing.
        Patch by Owen Taylor


svn path=/trunk/; revision=20705
parent 82bb50fd
2008-06-30 Matthias Clasen <mclasen@redhat.com>
Bug 540310 – Avoid unnecessary repaints when resizing GtkWindow
* gtk/gtkwindow.c: Avoid unnecessary redraws when resizing.
Patch by Owen Taylor
2008-06-29 Behdad Esfahbod <behdad@gnome.org> 2008-06-29 Behdad Esfahbod <behdad@gnome.org>
Bug 530255 – GtkAboutDialog cuts off comments label Bug 530255 – GtkAboutDialog cuts off comments label
......
...@@ -1549,7 +1549,7 @@ gtk_window_set_policy (GtkWindow *window, ...@@ -1549,7 +1549,7 @@ gtk_window_set_policy (GtkWindow *window,
g_object_notify (G_OBJECT (window), "resizable"); g_object_notify (G_OBJECT (window), "resizable");
g_object_thaw_notify (G_OBJECT (window)); g_object_thaw_notify (G_OBJECT (window));
gtk_widget_queue_resize (GTK_WIDGET (window)); gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
} }
static gboolean static gboolean
...@@ -1765,7 +1765,7 @@ gtk_window_set_position (GtkWindow *window, ...@@ -1765,7 +1765,7 @@ gtk_window_set_position (GtkWindow *window,
*/ */
info->position_constraints_changed = TRUE; info->position_constraints_changed = TRUE;
gtk_widget_queue_resize (GTK_WIDGET (window)); gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
} }
window->position = position; window->position = position;
...@@ -2690,7 +2690,7 @@ gtk_window_set_geometry_hints (GtkWindow *window, ...@@ -2690,7 +2690,7 @@ gtk_window_set_geometry_hints (GtkWindow *window,
gtk_window_set_gravity (window, geometry->win_gravity); gtk_window_set_gravity (window, geometry->win_gravity);
} }
gtk_widget_queue_resize (GTK_WIDGET (window)); gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
} }
/** /**
...@@ -3689,7 +3689,7 @@ gtk_window_set_default_size_internal (GtkWindow *window, ...@@ -3689,7 +3689,7 @@ gtk_window_set_default_size_internal (GtkWindow *window,
g_object_thaw_notify (G_OBJECT (window)); g_object_thaw_notify (G_OBJECT (window));
gtk_widget_queue_resize (GTK_WIDGET (window)); gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
} }
/** /**
...@@ -3804,7 +3804,7 @@ gtk_window_resize (GtkWindow *window, ...@@ -3804,7 +3804,7 @@ gtk_window_resize (GtkWindow *window,
info->resize_width = width; info->resize_width = width;
info->resize_height = height; info->resize_height = height;
gtk_widget_queue_resize (GTK_WIDGET (window)); gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
} }
/** /**
...@@ -6039,7 +6039,7 @@ gtk_window_move_resize (GtkWindow *window) ...@@ -6039,7 +6039,7 @@ gtk_window_move_resize (GtkWindow *window)
*/ */
info->last = saved_last_info; info->last = saved_last_info;
gtk_widget_queue_resize (widget); /* migth recurse for GTK_RESIZE_IMMEDIATE */ gtk_widget_queue_resize_no_redraw (widget); /* migth recurse for GTK_RESIZE_IMMEDIATE */
} }
return; /* Bail out, we didn't really process the move/resize */ return; /* Bail out, we didn't really process the move/resize */
...@@ -6132,7 +6132,7 @@ gtk_window_move_resize (GtkWindow *window) ...@@ -6132,7 +6132,7 @@ gtk_window_move_resize (GtkWindow *window)
*/ */
if (container->resize_mode == GTK_RESIZE_QUEUE) if (container->resize_mode == GTK_RESIZE_QUEUE)
{ {
gtk_widget_queue_resize (widget); gtk_widget_queue_resize_no_redraw (widget);
_gtk_container_dequeue_resize_handler (container); _gtk_container_dequeue_resize_handler (container);
} }
} }
...@@ -7049,7 +7049,7 @@ gtk_window_set_gravity (GtkWindow *window, ...@@ -7049,7 +7049,7 @@ gtk_window_set_gravity (GtkWindow *window,
/* gtk_window_move_resize() will adapt gravity /* gtk_window_move_resize() will adapt gravity
*/ */
gtk_widget_queue_resize (GTK_WIDGET (window)); gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
g_object_notify (G_OBJECT (window), "gravity"); g_object_notify (G_OBJECT (window), "gravity");
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment