After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 145387 - Losing focus while using GtkEntryCompletion
Losing focus while using GtkEntryCompletion
Status: RESOLVED DUPLICATE of bug 101190
Product: gtk+
Classification: Platform
Component: Widget: Other
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 147699 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-07-04 13:01 UTC by Karl Bartel
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Karl Bartel 2004-07-04 13:01:30 UTC
When the popup created by GtkEntryCompletion is closed (because all text in the
GtkEntry has been deleted) the focus is given to the window below the mouse
pointer, which is not necessarily the window containing the GtkEntry.

I'm using metacity with sloppy focus setting.
Comment 1 Owen Taylor 2004-07-05 15:18:04 UTC
Is this the case of 

 +--------------------------------+
 | +-------------------------+    |
 | |                         |    |
 | +-------------------------+    |
 +-|                         |----+
   |                         |
   |  X                      |
   +-------------------------+

Were the mouse point is X? This is a really nasty bug with
sloppy focus that really has nothing to do with GTK+ or this
widget. You can also get it to occur with menus, but menus
don't usually go outside their containing toplevel.

There may be a metacity bug to dup on.
Comment 2 Karl Bartel 2004-07-05 15:59:37 UTC
Your case causes the problem, too, but actually I'm having problems with this:

 +--------------------------------+
 | +-------------------------+    |
 | |                         |    |
 | +-------------------------+    |
 +-|                         |----+
   |                         |
   |                         |   X
   +-------------------------+


The window containing the GtkEntry was focused by keyboard (or because it was
just opened), and the mouse pointer is still above another window. In this case
I can make the window lose focus just by entering some text (making the popup
appear) and erasing it (making the popup disappear and the window loses focus).

I took a look at the open metacity bugs and couldn't find anything describing
anything similar, although there are quite some focus-related bugs. But perhaps
I just don't understand the problem well enough to recognize the corresponding
metacity bug.
Comment 3 Matthias Clasen 2004-07-16 14:00:30 UTC
*** Bug 147699 has been marked as a duplicate of this bug. ***
Comment 4 Karl Bartel 2004-08-17 16:32:22 UTC
This seems to be the same bug as
http://bugzilla.gnome.org/show_bug.cgi?id=101190, which is unfortunately a won't
fix.
Would it make sense to work around this in gtk (e.g. grabbing focus after
closing the popup)? It would be best if someone could come up with a way to fix
#101190, of course.

*** This bug has been marked as a duplicate of 101190 ***
Comment 5 Elijah Newren 2004-09-04 12:56:11 UTC
No need to work around it in gtk+; it appears that the metacity patch to fix
this is rather simple (see bug 101190).