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 555109 - Synthesized crossing events should have proper coordinates
Synthesized crossing events should have proper coordinates
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 560793 587074 590187 598128 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-10-05 14:44 UTC by Michael Monreal
Modified: 2018-02-10 03:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Monreal 2008-10-05 14:44:21 UTC
I often use type-ahead in the listview to quickly navigate to or near a folder. If I press "return" this correctly opens the folder. If I however double click now, strange things happen.

Example:

- have a folder TestA and TestB inside your home dir
- type "tes", nautilus will select "TestA".
- now double click (or just single click) "TestB"
- instead of opening "TestB", the first folder in my home dir ("art") is opened
Comment 1 Michael Monreal 2009-03-16 11:20:39 UTC
This is still the case in trunk. Also, this is not a GTK bug: doing the same in the file chooser works as expected.
Comment 2 Alexander Larsson 2009-03-16 11:42:14 UTC
I don't get the same behaviour, when i click on testB it doesn't open anything.
In fact I have to tripple click it to get anything to happen, the first click just pops down the typeahead dialog.
Comment 3 Alexander Larsson 2009-03-16 12:00:26 UTC
Ah, no I can reproduce it. It always happens if you click on the testB expander triangle, but only sometimes when clicking on the rest of the testB row.
Comment 4 Alexander Larsson 2009-03-20 15:03:57 UTC
I think the problem here is that nautilus never ever sees the first click when the typeahead window is up, instead it goes to the typeahead window, which does:

  if (event->window == tree_view->priv->bin_window)
    gtk_tree_view_button_press (GTK_WIDGET (tree_view), event);

But thats calls the treeview specific handler directly, overriding the signal handler that nautilus adds. I think it should emit the button_press_event signal instead.

Kris: Opinion?
Comment 5 Alexander Larsson 2009-03-20 20:48:35 UTC
Turns out this is a GtkTreeView bug.
To reproduce, use gtk-demo, the "tree store" test.
Click on january, then type "f" -> selects february, then click on presidents day.
This should select presidents day, but does instead close the january tree.

The source of the issue is that when we're hiding the typeahead window we're losing the grab, which somehow synthesizes an enter event on the treeview bin window, but it uses x=0, y=0 for the enter event. The treeview enter event handler handles this as if you had the mouse over 0,0 which means it prelights the expander arrow for the first row. Then when the button event comes we just directly expand this row.
Comment 6 Sebastien Bacher 2009-04-01 08:06:12 UTC
*** Bug 560793 has been marked as a duplicate of this bug. ***
Comment 7 Hans Nieser 2009-04-01 08:46:13 UTC
I can also reproduce this without using the typeahead window; if I just press SHIFT or ALT or CTRL, it seems to think i moved my mouse to x=0,y=0 as well as I can see the topmost expander 'light up' (see bug 560793 for more details). In the case of the gtk-demo tree store demo I need to select the list first, but the same problem occurs in nautilus (list view), which tends to mess up selecting multiple files depending on wether or not I move my mouse before I click a the mouse button to complete the selection.
Comment 8 Christian Stöveken 2009-04-30 17:21:09 UTC
I can confirm the first post by Michael Monrea.
The problem also shows in Nautilus 2.26.2.
Comment 9 Ketil Wendelbo Aanensen 2009-05-20 09:37:34 UTC
Shouldn't this be confirmed by popular demand yet? Here is the same bug in the Ubuntu bug tracker: https://bugs.launchpad.net/bugs/295408
Comment 10 Kristian Rietveld 2009-07-30 12:56:49 UTC
Confirming and looking into this.  Something seriously got messed up somewhere.
Comment 11 Kristian Rietveld 2009-07-30 18:29:50 UTC
I've put a temporary fix in GtkTreeView's enter-notify handling to ignore the synthesized crossing events.  This does not fix everything, but does get rid of the absurd behavior as reported in comment 5 and also in other channels.  Issues still are:

- Have the mouse pointer over the expander.  Expander turns black.  Press shift, expander turns white again.  This is due to the expander popping up off-screen.  (We still want leave-notify to handle the synthesized events, otherwise we still have the absurd behavior).  Ideally, the expander only turns back white when the search dialog pops up on-screen (not off-screen).

- When you have the mouse over the expander and the search dialog pops down, the expander should probably turn black.  For this the enter-notify event needs to be handled.  I don't think this is a very big issue for now.


Either way, I think that the synthesized crossing events should really have proper coordinates instead of (0, 0).  If they cannot have proper coordinates, they should have fake coordinates like (-100, -100).  (0, 0) is something in the middle and does not cut it.  These events were introduced by the fix of bug 56070.
Comment 12 Kristian Rietveld 2009-07-30 18:37:19 UTC
*** Bug 587074 has been marked as a duplicate of this bug. ***
Comment 13 Cosimo Cecchi 2009-10-18 14:42:05 UTC
*** Bug 590187 has been marked as a duplicate of this bug. ***
Comment 14 Cosimo Cecchi 2009-10-18 14:43:34 UTC
*** Bug 598128 has been marked as a duplicate of this bug. ***
Comment 15 Sense Hofstede 2010-02-03 08:06:25 UTC
According to comments on Launchpad in bug <https://launchpad.net/bugs/295408> this issue was fixed from Ubuntu 9.10, which uses Nautilus 2.28.
Comment 16 Matthias Clasen 2018-02-10 03:33:35 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.