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 672009 - gtk 3.3.18, missing "enter" events with pads devices, leads to menu selection issues and others
gtk 3.3.18, missing "enter" events with pads devices, leads to menu selection...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GdkDevice
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
Carlos Garnacho
: 672331 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-03-13 17:44 UTC by Sebastien Bacher
Modified: 2012-03-20 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch (4.66 KB, patch)
2012-03-19 02:58 UTC, Matthias Clasen
none Details | Review
GDK_DEBUG=input nautilus log when triggering the bug (2.33 KB, text/x-log)
2012-03-19 12:42 UTC, Sebastien Bacher
  Details

Description Sebastien Bacher 2012-03-13 17:44:14 UTC
The bug has been opened on https://bugs.launchpad.net/bugs/949414

"In GTK applications menu items are not always highlighted on mouse over (orange background).

12.04 - 20120307

When using touchpad, the menu items are not highlighted. When using a USB mouse or TrackPoint the widgets are reacting properly.

STR:
1. Open nautilus
2. Open the "File" menu, OR right-click in the window, OR open any of the option menus inside the Preferences window.
3. Move down through the menu using touchpad.
4. Click on a sensitive menu item.

Actual results:
3. The first sensitive item is highlighted, but (usually) none of the other sensitive items are.
4. The item is highlighted only once you click it.

Expected results:
Highlight should follow the mouse

This is not specific to menu items."
Comment 1 Sebastien Bacher 2012-03-13 17:45:06 UTC
Video showing the issue:
https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/949414/+attachment/2863141/+files/out.ogv

Test code from "Roman Yepishev (rye)"
https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/949414/+attachment/2863153/+files/gtk3ex.py

he wrote:

"The attached video shows that once the mouse click is being performed in the window using the touchpad, the widget no longer receives "enter" events, therefore it does not know that it needs to react."
Comment 2 Martin Pitt 2012-03-13 18:50:20 UTC
Confirming.
Comment 3 bwatkins 2012-03-13 20:20:06 UTC
Confirmed here as well. Asus U52f with an elantech touchpad. Menu highlights are not following mouse, and if I hover over a menu item that has a submenu, I need to left click the menu item to open the submenu.

As the original reporter mentioned this isn't specific to menu's either. It also happens when hovering over the navigation buttons in nautilus for example, they are not highlighted.

Works fine if I plugin a usb mouse
Comment 4 Matthias Clasen 2012-03-19 02:41:49 UTC
*** Bug 672331 has been marked as a duplicate of this bug. ***
Comment 5 Matthias Clasen 2012-03-19 02:58:46 UTC
Created attachment 210066 [details] [review]
a patch

Can you try this patch ?
I don't have such a device... but if I understand correctly, and the device gets classified as GDK_SOURCE_TOUCHPAD, the patch may work.
Comment 6 Sebastien Bacher 2012-03-19 09:34:28 UTC
Thanks Matthias, I will get the patch tested and comment back (I don't have the hardware here to test myself).

I noticed you changed menus code only though, the "missing enter events" showed by the GtkButton test case are not limited to menus though (I will update the title now). 

One of the bugs (https://launchpad.net/bugs/949029) shows that cairo dock is broken as well (the icons stopped doing their zoom effect on mouseover):
https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/949029/+attachment/2841624/+files/bug949029_with_cairo-dock.ogv

The issue happens also with overlay scrollbars in Ubuntu
Comment 7 Matthieu Baerts 2012-03-19 11:19:41 UTC
Hello,

I'm now using the new version of GTK3 packaged by Sebastien and I still have the same bug (with the menu and other apps that have to be notified when the pointer is above its window).

As said Sebastien, Cairo-Dock is broken as well.
I guess it's just like the GtkButton test case: its window is connected to these events: GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK
But most of the time, these signals are not send to the program if we are using a touchpad: enter-notify-event and leave-notify-event.
Comment 8 Matthias Clasen 2012-03-19 12:05:36 UTC
(In reply to comment #7)

> As said Sebastien, Cairo-Dock is broken as well.
> I guess it's just like the GtkButton test case: its window is connected to
> these events: GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK
> But most of the time, these signals are not send to the program if we are using
> a touchpad: enter-notify-event and leave-notify-event.

If you have any event traces to substantiate that, feel free to attach them here.
Comment 9 Matthieu Baerts 2012-03-19 12:19:28 UTC
(In reply to comment #8)
> If you have any event traces to substantiate that, feel free to attach them
> here.

Yes but if the dock don't receive these signals, how can I help you?
If I add a few g_print, I can see that the dock is not notified if I'm using my touchpad except when I click on it (right/left/middle click).
No problem with my USB mouse.
Comment 10 Sebastien Bacher 2012-03-19 12:42:20 UTC
Created attachment 210086 [details]
GDK_DEBUG=input nautilus log when triggering the bug
Comment 11 Benjamin Otte (Company) 2012-03-20 01:18:11 UTC
Should be fixed in
http://git.gnome.org/browse/gtk+/commit/?id=bd55519f7e6bb5da2fdf6f5e99bd79213059f81b

At lest it works with my magic trackpad now where before it didn't.
Comment 12 Matthieu Baerts 2012-03-20 07:57:47 UTC
@Benjamin: thank you! :)
It seems I no longer have this bug thanks to your patch!
Comment 13 bwatkins 2012-03-20 14:59:18 UTC
Confirmed benjamin's fix working here as well (elantech touchpad)