overview: Move overview actions and scrolling to background group
Both the Overview::scroll-event and actions added via addAction() are meant to work anywhere in the overview, but for now only work on the primary monitor. Move the handling to the background group that is known to span all outputs to fix. https://bugzilla.gnome.org/show_bug.cgi?id=766883
This commit is contained in:
parent
5182129196
commit
c39ffa111f
@ -111,7 +111,6 @@ const Overview = new Lang.Class({
|
|||||||
activities. See also note for "Activities" string. */
|
activities. See also note for "Activities" string. */
|
||||||
this._overview = new St.BoxLayout({ name: 'overview',
|
this._overview = new St.BoxLayout({ name: 'overview',
|
||||||
accessible_name: _("Overview"),
|
accessible_name: _("Overview"),
|
||||||
reactive: true,
|
|
||||||
vertical: true });
|
vertical: true });
|
||||||
this._overview.add_constraint(new LayoutManager.MonitorConstraint({ primary: true }));
|
this._overview.add_constraint(new LayoutManager.MonitorConstraint({ primary: true }));
|
||||||
this._overview._delegate = this;
|
this._overview._delegate = this;
|
||||||
@ -121,10 +120,13 @@ const Overview = new Lang.Class({
|
|||||||
// one. Instances of this class share a single CoglTexture behind the
|
// one. Instances of this class share a single CoglTexture behind the
|
||||||
// scenes which allows us to show the background with different
|
// scenes which allows us to show the background with different
|
||||||
// rendering options without duplicating the texture data.
|
// rendering options without duplicating the texture data.
|
||||||
this._backgroundGroup = new Meta.BackgroundGroup();
|
this._backgroundGroup = new Meta.BackgroundGroup({ reactive: true });
|
||||||
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);
|
||||||
|
|
||||||
@ -249,7 +251,6 @@ const Overview = new Lang.Class({
|
|||||||
|
|
||||||
// Add our same-line elements after the search entry
|
// Add our same-line elements after the search entry
|
||||||
this._overview.add(this._controls.actor, { y_fill: true, expand: true });
|
this._overview.add(this._controls.actor, { y_fill: true, expand: true });
|
||||||
this._controls.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
|
|
||||||
|
|
||||||
// TODO - recalculate everything when desktop size changes
|
// TODO - recalculate everything when desktop size changes
|
||||||
this.dashIconSize = this._dash.iconSize;
|
this.dashIconSize = this._dash.iconSize;
|
||||||
@ -366,7 +367,7 @@ const Overview = new Lang.Class({
|
|||||||
if (this.isDummy)
|
if (this.isDummy)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._overview.add_action(action);
|
this._backgroundGroup.add_action(action);
|
||||||
},
|
},
|
||||||
|
|
||||||
_getDesktopClone: function() {
|
_getDesktopClone: function() {
|
||||||
|
@ -421,7 +421,6 @@ const ControlsManager = new Lang.Class({
|
|||||||
|
|
||||||
let layout = new ControlsLayout();
|
let layout = new ControlsLayout();
|
||||||
this.actor = new St.Widget({ layout_manager: layout,
|
this.actor = new St.Widget({ layout_manager: layout,
|
||||||
reactive: true,
|
|
||||||
x_expand: true, y_expand: true,
|
x_expand: true, y_expand: true,
|
||||||
clip_to_allocation: true });
|
clip_to_allocation: true });
|
||||||
this._group = new St.BoxLayout({ name: 'overview-group',
|
this._group = new St.BoxLayout({ name: 'overview-group',
|
||||||
|
Loading…
Reference in New Issue
Block a user