GNOME Bugzilla – Bug 593362
gnome-shell hangs if I try to open the user menu while in overlay
Last modified: 2009-08-28 16:44:12 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)
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
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 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.
Pushed (in two parts, forgot to fix up the comment before pushing the first time.)