From 78492a5deb39c43f321cfe0b1106c92e6b4a5a5f Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 4 Apr 2002 15:34:09 +0000 Subject: Don't show the popup if the entry->item doesn't have focus. * gal/e-text/e-entry.c (e_entry_show_popup): Don't show the popup if the entry->item doesn't have focus. svn path=/trunk/; revision=16345 --- widgets/text/e-entry.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'widgets/text/e-entry.c') diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c index 6301672124..6c060244f5 100644 --- a/widgets/text/e-entry.c +++ b/widgets/text/e-entry.c @@ -477,6 +477,11 @@ e_entry_show_popup (EEntry *entry, gboolean visible) if (pop == NULL) return; + /* The async query can give us a result after the focus was lost by the + widget. In that case, we don't want to show the pop-up. */ + if (! GTK_WIDGET_HAS_FOCUS (entry->canvas)) + return; + if (visible) { GtkAllocation *dim = &(GTK_WIDGET (entry)->allocation); gint x, y, xo, yo, fudge; -- cgit v1.2.3