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
This commit is contained in:
Florian Müllner 2016-07-02 11:16:22 +02:00
parent 208ed6e90d
commit 99b5e10acf
2 changed files with 5 additions and 4 deletions

View File

@ -220,7 +220,8 @@ const LayoutManager = new Lang.Class({
global.stage.add_child(this.uiGroup); global.stage.add_child(this.uiGroup);
this.overviewGroup = new St.Widget({ name: 'overviewGroup', this.overviewGroup = new St.Widget({ name: 'overviewGroup',
visible: false }); visible: false,
reactive: true });
this.addChrome(this.overviewGroup); this.addChrome(this.overviewGroup);
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup', this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',

View File

@ -124,9 +124,6 @@ const Overview = new Lang.Class({
Main.layoutManager.overviewGroup.add_child(this._backgroundGroup); Main.layoutManager.overviewGroup.add_child(this._backgroundGroup);
this._bgManagers = []; this._bgManagers = [];
this._backgroundGroup.connect('scroll-event',
Lang.bind(this, this._onScrollEvent));
this._desktopFade = new St.Widget(); this._desktopFade = new St.Widget();
Main.layoutManager.overviewGroup.add_child(this._desktopFade); Main.layoutManager.overviewGroup.add_child(this._desktopFade);
@ -155,6 +152,9 @@ const Overview = new Lang.Class({
dragMotion: Lang.bind(this, this._onDragMotion) 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-begin', Lang.bind(this, this._onDragBegin));
Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd)); Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));