[gnome-shell/wip/re-search-v2: 1/33] overview: fix workspace view scrolling regression



commit 5a617ec0d96a50e9543d6676385862b2954b04e2
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sun Dec 2 18:22:28 2012 -0500

    overview: fix workspace view scrolling regression

 js/ui/overview.js       |    7 -------
 js/ui/workspacesView.js |    9 ++++-----
 2 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 9c91378..6e50c66 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -333,13 +333,6 @@ const Overview = new Lang.Class({
         return DND.DragMotionResult.CONTINUE;
     },
 
-    addAction: function(action) {
-        if (this.isDummy)
-            return;
-
-        this._group.add_action(action);
-    },
-
     _getDesktopClone: function() {
         let windows = global.get_window_actors().filter(function(w) {
             return w.meta_window.get_window_type() == Meta.WindowType.DESKTOP;
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 95d8ca5..2766db2 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -438,12 +438,11 @@ const WorkspacesDisplay = new Lang.Class({
     Name: 'WorkspacesDisplay',
 
     _init: function() {
-        this.actor = new Shell.GenericContainer();
-        this.actor.connect('get-preferred-width', Lang.bind(this, this._getPreferredWidth));
-        this.actor.connect('get-preferred-height', Lang.bind(this, this._getPreferredHeight));
-        this.actor.connect('allocate', Lang.bind(this, this._allocate));
+        this.actor = new Shell.GenericContainer({ reactive: true });
+        this.actor.connect('allocate', Lang.bind(this, this._updateWorkspacesGeometry));
         this.actor.connect('parent-set', Lang.bind(this, this._parentSet));
         this.actor.set_clip_to_allocation(true);
+
         let action = new Clutter.PanAction();
         action.connect('pan', Lang.bind(this, this._onPan));
         action.connect('gesture-begin', Lang.bind(this, function() {
@@ -455,7 +454,7 @@ const WorkspacesDisplay = new Lang.Class({
             for (let i = 0; i < this._workspacesViews.length; i++)
                 this._workspacesViews[i].endSwipeScroll();
         }));
-        Main.overview.addAction(action);
+        this.actor.add_action(action);
         this.actor.bind_property('mapped', action, 'enabled', GObject.BindingFlags.SYNC_CREATE);
 
         let controls = new St.Bin({ style_class: 'workspace-controls',



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]