[gnome-shell/wip/paging-release: 9/85] appDisplay: 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: 9/85] appDisplay: Fix click action outside folder pop up
- Date: Mon, 12 Aug 2013 14:42:02 +0000 (UTC)
commit 3e4887818fd36ad75507c83987c0f5fb276f7811
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Thu Jun 27 21:08:53 2013 +0200
appDisplay: 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 b83484e..779fc4f 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 (container, forWidht) {
@@ -412,6 +424,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;
@@ -610,7 +623,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]