From aa79f94ac71009bc041d8b56dfd3f42c0605ceee Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 27 Sep 2005 04:48:53 +0000 Subject: [PATCH] Pop below the entry if there's more free space below the entry than above. * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): Pop below the entry if there's more free space below the entry than above. (#316948, Tommi Komulainen) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtkentrycompletion.c | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0623a0b7de..4173cee3d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-27 Matthias Clasen + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): + Pop below the entry if there's more free space below the entry + than above. (#316948, Tommi Komulainen) + 2005-09-26 Federico Mena Quintero Do not create the save mode-specific widgets in the open modes, so diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0623a0b7de..4173cee3d2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-09-27 Matthias Clasen + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): + Pop below the entry if there's more free space below the entry + than above. (#316948, Tommi Komulainen) + 2005-09-26 Federico Mena Quintero Do not create the save mode-specific widgets in the open modes, so diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 2c327153ae..92a850185e 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1387,7 +1387,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion) else if (x + popup_req.width > monitor.x + monitor.width) x = monitor.x + monitor.width - popup_req.width; - if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height) + if (y + entry_req.height + popup_req.height <= monitor.y + monitor.height || + y - monitor.y < (monitor.y + monitor.height) - (y + entry_req.height)) { y += entry_req.height; above = FALSE;