[gtk+] gtkwindow: Fix the comment for an optimization
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkwindow: Fix the comment for an optimization
- Date: Tue, 15 Jul 2014 18:49:25 +0000 (UTC)
commit b7a8bde89581fa1d9aa800828c1347fdb4507aa7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Jul 15 14:41:04 2014 -0400
gtkwindow: Fix the comment for an optimization
The optimization was incorrect, and so it was changed in commit
2bf6824, but the comment to go along with it was never updated.
gtk/gtkwindow.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index f764bb8..76608d3 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7155,13 +7155,14 @@ gtk_window_configure_event (GtkWidget *widget,
priv->configure_request_count -= 1;
gdk_window_thaw_toplevel_updates_libgtk_only (gtk_widget_get_window (widget));
}
-
- /* As an optimization, we avoid a resize when possible.
+
+ /* If this is a gratuitous ConfigureNotify that's already
+ * the same as our allocation, then we can fizzle it out.
+ * This is the case for dragging windows around.
*
- * The only times we can avoid a resize are:
- * - we know only the position changed, not the size
- * - we know we have made more requests and so will get more
- * notifies and can wait to resize when we get them
+ * We can't do this for a ConfigureRequest, since it might
+ * have been a queued resize from child widgets, and so we
+ * need to reallocate our children in case *they* changed.
*/
gtk_widget_get_allocation (widget, &allocation);
if (!expected_reply &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]