popupMenu: Fix touch handling of PopupSubMenuMenuItem
It overrides ::button-release-event in order to implement the hidden/shown toggling, it must do the same on TOUCH_END, otherwise menus stay shown on touch. https://bugzilla.gnome.org/show_bug.cgi?id=756748
This commit is contained in:
parent
ffa8c2f2b1
commit
67afd7a6d8
@ -1146,6 +1146,16 @@ const PopupSubMenuMenuItem = new Lang.Class({
|
||||
this.actor.remove_style_pseudo_class ('active');
|
||||
this._setOpenState(!this._getOpenState());
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
},
|
||||
|
||||
_onTouchEvent: function(actor, event) {
|
||||
if (event.type() == Clutter.EventType.TOUCH_END) {
|
||||
// Since we override the parent, we need to manage what the parent does
|
||||
// with the active style class
|
||||
this.actor.remove_style_pseudo_class ('active');
|
||||
this._setOpenState(!this._getOpenState());
|
||||
}
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user