From 203d7f660f2835c7a59295e7e043b9af00371998 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 7 Oct 2002 16:51:50 +0000 Subject: [PATCH] Clean up the handling of clearing transient state settings, fixing bug Mon Oct 7 12:40:39 2002 Owen Taylor * gtk/gtkwindow.c (gtk_window_move_resize): Clean up the handling of clearing transient state settings, fixing bug #95026, reported by Jami Pekannen. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkwindow.c | 26 +++++++++++++------------- 7 files changed, 55 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e980b7501f..92fef104d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Oct 7 12:40:39 2002 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_move_resize): Clean + up the handling of clearing transient state + settings, fixing bug #95026, reported by Jami + Pekannen. + Mon Oct 7 11:45:17 2002 Owen Taylor * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e980b7501f..92fef104d3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Mon Oct 7 12:40:39 2002 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_move_resize): Clean + up the handling of clearing transient state + settings, fixing bug #95026, reported by Jami + Pekannen. + Mon Oct 7 11:45:17 2002 Owen Taylor * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e980b7501f..92fef104d3 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Mon Oct 7 12:40:39 2002 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_move_resize): Clean + up the handling of clearing transient state + settings, fixing bug #95026, reported by Jami + Pekannen. + Mon Oct 7 11:45:17 2002 Owen Taylor * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e980b7501f..92fef104d3 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Mon Oct 7 12:40:39 2002 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_move_resize): Clean + up the handling of clearing transient state + settings, fixing bug #95026, reported by Jami + Pekannen. + Mon Oct 7 11:45:17 2002 Owen Taylor * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e980b7501f..92fef104d3 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Mon Oct 7 12:40:39 2002 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_move_resize): Clean + up the handling of clearing transient state + settings, fixing bug #95026, reported by Jami + Pekannen. + Mon Oct 7 11:45:17 2002 Owen Taylor * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e980b7501f..92fef104d3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Mon Oct 7 12:40:39 2002 Owen Taylor + + * gtk/gtkwindow.c (gtk_window_move_resize): Clean + up the handling of clearing transient state + settings, fixing bug #95026, reported by Jami + Pekannen. + Mon Oct 7 11:45:17 2002 Owen Taylor * gdk/x11/gdkkeys-x11.c (update_keymaps): If Mode_switch diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 62f5315b9a..6d3f419ae1 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -4845,6 +4845,8 @@ gtk_window_move_resize (GtkWindow *window) gtk_widget_queue_resize (widget); /* migth recurse for GTK_RESIZE_IMMEDIATE */ } + + return; /* Bail out, we didn't really process the move/resize */ } else if ((configure_request_size_changed || hints_changed) && (widget->allocation.width != new_request.width || @@ -4899,16 +4901,6 @@ gtk_window_move_resize (GtkWindow *window) /* Increment the number of have-not-yet-received-notify requests */ window->configure_request_count += 1; - /* We have now sent a request since the last position constraint - * change and definitely don't need a an initial size again (not - * resetting this here can lead to infinite loops for - * GTK_RESIZE_IMMEDIATE containers) - */ - info->position_constraints_changed = FALSE; - info->initial_pos_set = FALSE; - info->resize_width = -1; - info->resize_height = -1; - /* for GTK_RESIZE_QUEUE toplevels, we are now awaiting a new * configure event in response to our resizing request. * the configure event will cause a new resize with @@ -4945,14 +4937,22 @@ gtk_window_move_resize (GtkWindow *window) else gdk_window_move (widget->window, new_request.x, new_request.y); - - info->initial_pos_set = FALSE; } - + /* And run the resize queue. */ gtk_container_resize_children (container); } + + /* We have now processed a move/resize since the last position + * constraint change, setting of the initial position, or resize. + * (Not resetting these flags here can lead to infinite loops for + * GTK_RESIZE_IMMEDIATE containers) + */ + info->position_constraints_changed = FALSE; + info->initial_pos_set = FALSE; + info->resize_width = -1; + info->resize_height = -1; } /* Compare two sets of Geometry hints for equality.