[gnome-shell/wip/paging-release: 6/74] 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: 6/74] appDisplay:..We need the pan action commit before.. Fix click action outside folder pop up
- Date: Mon, 12 Aug 2013 21:10:44 +0000 (UTC)
commit 7c4acf0fd30906de204d9a64a302212dd8416ab5
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 | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index d877ae9..27fc650 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -287,6 +287,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) {
@@ -460,6 +472,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;
@@ -688,7 +701,8 @@ const FrequentView = new Lang.Class({
continue;
let appIcon = new AppIcon(mostUsed[i]);
this._grid.addItem(appIcon.actor, -1);
- } }
+ }
+ }
});
const Views = {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]