[gnome-shell/wip/paging-release: 8/38] 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: 8/38] appDisplay:..We need the pan action commit before.. Fix click action outside folder pop up
- Date: Tue, 13 Aug 2013 20:11:41 +0000 (UTC)
commit 785bd9d83cf6195ffa7fa6a78a0f13a577203b2d
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 359fe56..efb94e4 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]