panel: Make the "Activities" button react to touch events
https://bugzilla.gnome.org/show_bug.cgi?id=733633
This commit is contained in:
parent
f8899cf274
commit
38d05a8285
@ -571,7 +571,7 @@ const ActivitiesButton = new Lang.Class({
|
||||
this.actor.label_actor = this._label;
|
||||
|
||||
this.actor.connect('captured-event', Lang.bind(this, this._onCapturedEvent));
|
||||
this.actor.connect_after('button-release-event', Lang.bind(this, this._onButtonRelease));
|
||||
this.actor.connect_after('event', Lang.bind(this, this._onEvent));
|
||||
this.actor.connect_after('key-release-event', Lang.bind(this, this._onKeyRelease));
|
||||
|
||||
Main.overview.connect('showing', Lang.bind(this, function() {
|
||||
@ -600,16 +600,21 @@ const ActivitiesButton = new Lang.Class({
|
||||
},
|
||||
|
||||
_onCapturedEvent: function(actor, event) {
|
||||
if (event.type() == Clutter.EventType.BUTTON_PRESS) {
|
||||
if (event.type() == Clutter.EventType.BUTTON_PRESS ||
|
||||
event.type() == Clutter.EventType.TOUCH_BEGIN) {
|
||||
if (!Main.overview.shouldToggleByCornerOrButton())
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
},
|
||||
|
||||
_onButtonRelease: function() {
|
||||
_onEvent: function(actor, event) {
|
||||
if (event.type() == Clutter.EventType.TOUCH_END ||
|
||||
event.type() == Clutter.EventType.BUTTON_RELEASE) {
|
||||
|
||||
Main.overview.toggle();
|
||||
this.menu.close();
|
||||
}
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user