From dfcb773476d83b6c070c293a12913ea5d5cd114f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 4 Feb 2005 17:45:05 +0000 Subject: [PATCH] Work better when there is not enough space. This avoids a nasty size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2005-02-04 Matthias Clasen * gtk/gtkpaned.c (gtk_paned_compute_position): Work better when there is not enough space. This avoids a nasty size allocation loop in the file chooser. (#154007, reported by Milosz Derezynski, patch by Robert Ögren) --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkpaned.c | 1 + 4 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index c3bd1daa1f..e9e208e3d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-02-04 Matthias Clasen + + * gtk/gtkpaned.c (gtk_paned_compute_position): Work better + when there is not enough space. This avoids a nasty size + allocation loop in the file chooser. (#154007, reported + by Milosz Derezynski, patch by Robert Ögren) + 2005-02-04 Matthias Clasen * gtk/gtkentry.c (gtk_entry_create_layout): Avoid spurious diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c3bd1daa1f..e9e208e3d3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2005-02-04 Matthias Clasen + + * gtk/gtkpaned.c (gtk_paned_compute_position): Work better + when there is not enough space. This avoids a nasty size + allocation loop in the file chooser. (#154007, reported + by Milosz Derezynski, patch by Robert Ögren) + 2005-02-04 Matthias Clasen * gtk/gtkentry.c (gtk_entry_create_layout): Avoid spurious diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c3bd1daa1f..e9e208e3d3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2005-02-04 Matthias Clasen + + * gtk/gtkpaned.c (gtk_paned_compute_position): Work better + when there is not enough space. This avoids a nasty size + allocation loop in the file chooser. (#154007, reported + by Milosz Derezynski, patch by Robert Ögren) + 2005-02-04 Matthias Clasen * gtk/gtkentry.c (gtk_entry_create_layout): Avoid spurious diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index a6a4ef6823..7ab84b44dc 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -1172,6 +1172,7 @@ gtk_paned_compute_position (GtkPaned *paned, paned->max_position = allocation; if (!paned->child2_shrink) paned->max_position = MAX (1, paned->max_position - child2_req); + paned->max_position = MAX (paned->min_position, paned->max_position); if (!paned->position_set) {