[gnome-shell/wip/paging-release: 5/12] appDisplay:..We need the pan action commit before.. Fix click action outside folder pop up
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/paging-release: 5/12] appDisplay:..We need the pan action commit before.. Fix click action outside folder pop up
- Date: Wed, 14 Aug 2013 16:35:36 +0000 (UTC)
commit d2e29323df3dcb14dc5a5220b275b37d8c146018
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Thu Jun 27 21:08:53 2013 +0200
appDisplay:..We need the pan action commit before.. Fix click action outside folder pop up
js/ui/appDisplay.js | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 2eec11d..3117e28 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -285,6 +285,18 @@ const PaginationScrollView = new Lang.Class({
}));
this._panAction = panAction;
this.add_action(panAction);
+
+ this._clickAction = new Clutter.ClickAction();
+ this._clickAction.connect('clicked', Lang.bind(this, function() {
+ if (!this._currentPopup)
+ return;
+
+ let [x, y] = this._clickAction.get_coords();
+ let actor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y);
+ if (!this._currentPopup.actor.contains(actor))
+ this._currentPopup.popdown();
+ }));
+ this._eventBlocker.add_action(this._clickAction);
},
vfunc_get_preferred_height: function (forWidht) {
@@ -449,6 +461,7 @@ const PaginationScrollView = new Lang.Class({
},
_onPan: function(action) {
+ this._clickAction.release();
let [dist, dx, dy] = action.get_motion_delta(0);
let adjustment = this.vscroll.adjustment;
adjustment.value -= (dy / this.height) * adjustment.page_size;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]