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 593362 - gnome-shell hangs if I try to open the user menu while in overlay
gnome-shell hangs if I try to open the user menu while in overlay
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal critical
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 593399
Blocks:
 
 
Reported: 2009-08-28 08:05 UTC by Nuno Donato
Modified: 2009-08-28 16:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix hang when clicking on the user status menu in the overview (6.08 KB, patch)
2009-08-28 15:32 UTC, Owen Taylor
accepted-commit_now Details | Review

Description Nuno Donato 2009-08-28 08:05:36 UTC
After clicking Activities and opening the overlay mode, if I press my user name to open the user menu (to log out, for example), the whole interface hangs.
I can't click on anything, nor can I close the overlay. Everything seems to keep running, but I just cant close the overlay or do anything else.

Eventually the only way to get out is to kill mutter or gdm.
(running on Ubuntu Jaunty, latest version from git)
Comment 1 Owen Taylor 2009-08-28 15:32:34 UTC
Created attachment 141938 [details] [review]
Fix hang when clicking on the user status menu in the overview

shell-global.[ch]: Add shell_global_display_is_grabbed() that
  uses the newly added meta_display_get_grab_op() to check
  for existing grabs.
shell-status-menu.[ch]: Add shell_status_menu_is_active() to
  check if the menu is popped up. Check for active grabs before
  popping the menu up. Use gtk_menu_popdown() rather than
  gtk_widget_hide(). Remove an excess gtk_widget_show() and
  some excess casts.
panel.js: Check whether the status menu is popped up after button
  release, and if it's not popped up, unhighlight the button.

Reported by Nuno Donato
Comment 2 Owen Taylor 2009-08-28 15:35:20 UTC
The approach taken here is very correct in terms of determining that we can't pop up the menu and preventing the user from getting stuck. It has some deficiencies:

 - It doesn't provide any hints as to how we would actually make this work
   in the overlay (other than not using a GTK+ menu)

 - Visually disabling the user menu would provide more explanation to the
   user.

But it should be an improvement for now.
Comment 3 Colin Walters 2009-08-28 16:04:19 UTC
Comment on attachment 141938 [details] [review]
Fix hang when clicking on the user status menu in the overview


>+        // This depends on connection ordering: since we are after the Button's
>+        // ::button-release-event handler, calling button.release() will properly
>+        // unset the 'active' flag for this stays-pressed button
>+        statusbutton.button.connect('button-release-event', function (b, e) {
>+            if (!statusmenu.is_active())
>+                statusbutton.release();
>+            return false;
>+        });

I'd add a comment about why we're doing this, to make the button be a no-op when we're holding a grab.
Or maybe just link to this bug.
Comment 4 Owen Taylor 2009-08-28 16:44:12 UTC
Pushed (in two parts, forgot to fix up the comment before pushing the first time.)