[gnome-shell/T27795: 99/138] appDisplay, viewSelector: Disable mouse scrolling of the desktop clone



commit 5d9215199c52dcb79dc36474ffd12ac09e5bcfff
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Fri Jun 16 23:04:06 2017 +0100

    appDisplay, viewSelector: Disable mouse scrolling of the desktop clone
    
    The desktop clone is added inside a AllViewContainer actor which contains
    a scroll view where the clone is added. Since that scroll view is reactive
    and the cloned actor can be larger than the screen when having multiple
    pages, it is possible to scroll it with the mouse, which is weird.
    
    Add an extra parameter to the AllViewContainer class to decide whether
    we want to disable scrolling in the internal scroll view, and disable
    it when using this container to host the cloned desktop.
    
    https://phabricator.endlessm.com/T17662

 js/ui/appDisplay.js   | 5 ++++-
 js/ui/viewSelector.js | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 79734d1f88..4811a8451e 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -302,13 +302,15 @@ Signals.addSignalMethods(BaseAppView.prototype);
 
 var AllViewContainer = GObject.registerClass(
 class AllViewContainer extends St.Widget {
-    _init(gridActor) {
+    _init(gridActor, params) {
         super._init({
             layout_manager: new Clutter.BinLayout(),
             x_expand: true,
             y_expand: true,
         });
 
+        params = Params.parse(params, { allowScrolling: true });
+
         this.gridActor = gridActor;
 
         gridActor.y_expand = true;
@@ -321,6 +323,7 @@ class AllViewContainer extends St.Widget {
             x_fill: true,
             y_fill: false,
             reactive: true,
+            reactive: params.allowScrolling,
             hscrollbar_policy: St.PolicyType.NEVER,
             vscrollbar_policy: St.PolicyType.EXTERNAL,
             y_align: Clutter.ActorAlign.START,
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index ba019bd47f..4480145a9a 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -505,6 +505,7 @@ class ViewsClone extends St.Widget {
             x_expand: true,
             y_expand: true,
             reactive: false,
+            opacity: AppDisplay.EOS_ACTIVE_GRID_OPACITY,
         });
 
         // Ensure the cloned grid is scrolled to the same page as the original one


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