From 99b5e10acf9e84af3d18dad831b4c7488cdc5f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 2 Jul 2016 11:16:22 +0200 Subject: [PATCH] overview: Move ::scroll-event signal handling (again) Commit c39ffa111 moved the signal handling from the controls- to the background-group to enable scrolling on non-primary monitors. However this broke scrolling on reactive overview elements as the workspace switcher, as they're not descendants of the background. To fix, move scroll-event handling to the overview group itself, which is the common ancestor of all overview elements. https://bugzilla.gnome.org/show_bug.cgi?id=768316 --- js/ui/layout.js | 3 ++- js/ui/overview.js | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index 9d481cf0b..aaf9da536 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -220,7 +220,8 @@ const LayoutManager = new Lang.Class({ global.stage.add_child(this.uiGroup); this.overviewGroup = new St.Widget({ name: 'overviewGroup', - visible: false }); + visible: false, + reactive: true }); this.addChrome(this.overviewGroup); this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup', diff --git a/js/ui/overview.js b/js/ui/overview.js index ea6b3ec98..1af870632 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -124,9 +124,6 @@ const Overview = new Lang.Class({ Main.layoutManager.overviewGroup.add_child(this._backgroundGroup); this._bgManagers = []; - this._backgroundGroup.connect('scroll-event', - Lang.bind(this, this._onScrollEvent)); - this._desktopFade = new St.Widget(); Main.layoutManager.overviewGroup.add_child(this._desktopFade); @@ -155,6 +152,9 @@ const Overview = new Lang.Class({ dragMotion: Lang.bind(this, this._onDragMotion) }; + + Main.layoutManager.overviewGroup.connect('scroll-event', + Lang.bind(this, this._onScrollEvent)); Main.xdndHandler.connect('drag-begin', Lang.bind(this, this._onDragBegin)); Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));