ActivitiesButton: fix overview being toggled while still animating

Adds the missing checks for whether we should toggle the overview, on
button and key release.

https://bugzilla.gnome.org/show_bug.cgi?id=756925
This commit is contained in:
Rui Matos 2015-10-22 18:12:28 +02:00
parent d8336efddc
commit 007ac93cd6

View File

@ -459,6 +459,7 @@ const ActivitiesButton = new Lang.Class({
if (event.type() == Clutter.EventType.TOUCH_END || if (event.type() == Clutter.EventType.TOUCH_END ||
event.type() == Clutter.EventType.BUTTON_RELEASE) event.type() == Clutter.EventType.BUTTON_RELEASE)
if (Main.overview.shouldToggleByCornerOrButton())
Main.overview.toggle(); Main.overview.toggle();
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
@ -467,6 +468,7 @@ const ActivitiesButton = new Lang.Class({
_onKeyRelease: function(actor, event) { _onKeyRelease: function(actor, event) {
let symbol = event.get_key_symbol(); let symbol = event.get_key_symbol();
if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) { if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) {
if (Main.overview.shouldToggleByCornerOrButton())
Main.overview.toggle(); Main.overview.toggle();
} }
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;