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 436416 - Opening toolbar menu with hotkey causes mouse pointer change
Opening toolbar menu with hotkey causes mouse pointer change
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
unspecified
Other All
: High minor
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2007-05-06 19:07 UTC by Ori Avtalion
Modified: 2016-05-24 11:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Ori Avtalion 2007-05-06 19:07:54 UTC
Please describe the problem:
In some situations, when using hotkeys to access the menu, the cursor may incorrectly change the icon to "resize".

Steps to reproduce:
1. Start Nautilus (For example)
2. Position the cursor outside of the window
3. Press Alt+F to pop up the File menu


Actual results:
The mouse cursor turns to a "resize" icon. The direction of the resize depends on the cursor's position relative to the window.

Expected results:
The cursor should not be affected by this action

Does this happen every time?
Yes

Other information:
I am using GNOME 2.18.1
Comment 1 Ori Avtalion 2007-05-06 19:13:19 UTC
I am referring to the MOUSE cursor in the description. Not the caret.
Comment 2 Christian Kirbach 2007-05-06 19:17:51 UTC
I can reproduce by moving the mouse pointer out of the app window before using the hotkey.

works with any gtk+ menu bar

mclasen, gnome-love bug??
Comment 3 Matthias Clasen 2007-05-06 20:28:49 UTC
How odd.

I don't think there is anything gnome-love specific about this bug. It is certainly something we should fix for the next release. Patches are always
appreciated, of course.
Comment 4 Matthias Clasen 2007-05-07 03:19:24 UTC
Pretty sure this is a metacity problem.
GTK+ does not do any gdk_window_set_cursor calls in this
scenario, and the problem does not happen e.g. with twm.
Comment 5 Ori Avtalion 2007-05-07 18:35:30 UTC
I narrowed this down to metacity's frame.c

http://svn.gnome.org/viewcvs/metacity/trunk/src/frames.c?view=markup

meta_frames_enter_notify_event() is called when the menu is opened.

Inside, the get_control() function decides what cursor icon should be displayed.
Its "resize" cursor checks are very simplistic - "If I'm to the right of the window's edge, draw a RESIZE_EAST cursor" - it assumes get_control() is only called when the cursor is actually inside the window or on its edge.

When I disable the calls to get_control and meta_frames_update_prelit_control in the function mentioned above, it works, but I'm not sure what else is broken, or why those calls are there.

Related revision: http://svn.gnome.org/viewcvs/metacity?view=revision&revision=302
Comment 6 Matthias Clasen 2007-05-07 19:01:26 UTC
Thanks for tracking it down this far.
Comment 7 Elijah Newren 2007-05-08 00:30:11 UTC
Don't have any time to check into it and verify, but from Ori's extra details I bet this is being caused by us getting a NotifyGrab/NotifyUngrab EnterNotify and us responding to it.  The intent was really to only worry about EnterNotifies with a normal crossing, so filtering out GDK_CROSSING_GRAB/GDK_CROSSING_UNGRAB enter notifies may fix this (much like bug 101190...)