Improve comment about button-release-event handler
Improve the documentation about the button-release-event handler we put on the status-menu button at Colin's suggestion. http://bugzilla.gnome.org/show_bug.cgi?id=593362
This commit is contained in:
parent
1340413740
commit
943c5e2edc
@ -381,9 +381,14 @@ Panel.prototype = {
|
|||||||
statusmenu.toggle(e);
|
statusmenu.toggle(e);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
// This depends on connection ordering: since we are after the Button's
|
// If popping up the menu failed (because there was already a grab in
|
||||||
// ::button-release-event handler, calling button.release() will properly
|
// effect from Mutter or another app), then we'll never get a ::deactivated
|
||||||
// unset the 'active' flag for this stays-pressed button
|
// signal because the menu was never activated, so we need to unhighlight
|
||||||
|
// separately when the user releases the mouse button.
|
||||||
|
//
|
||||||
|
// We depend on connection ordering; this needs to be called after Button's
|
||||||
|
// ::button-release-event handler; that will set the active flag for this
|
||||||
|
// stays-pressed button, then we unset the active flag by calling release().
|
||||||
statusbutton.button.connect('button-release-event', function (b, e) {
|
statusbutton.button.connect('button-release-event', function (b, e) {
|
||||||
if (!statusmenu.is_active())
|
if (!statusmenu.is_active())
|
||||||
statusbutton.release();
|
statusbutton.release();
|
||||||
|
Loading…
Reference in New Issue
Block a user