workspacesView: Enable keynav between all monitors

Instead of using one focus group for each (per-monitor) workspacesView,
use a single one that is shared between all of them.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/412
This commit is contained in:
Florian Müllner 2018-08-01 16:13:59 +02:00
parent eeda54f24d
commit 38c05d91a8

View File

@ -33,7 +33,6 @@ var WorkspacesViewBase = new Lang.Class({
this.actor = new St.Widget({ style_class: 'workspaces-view',
reactive: true });
this.actor.connect('destroy', this._onDestroy.bind(this));
global.focus_manager.add_group(this.actor);
// The actor itself isn't a drop target, so we don't want to pick on its area
this.actor.set_size(0, 0);
@ -428,6 +427,10 @@ var WorkspacesDisplay = new Lang.Class({
this.actor.connect('notify::allocation', this._updateWorkspacesActualGeometry.bind(this));
this.actor.connect('parent-set', this._parentSet.bind(this));
this._viewsContainer = new St.Widget();
Main.layoutManager.overviewGroup.add_actor(this._viewsContainer);
global.focus_manager.add_group(this._viewsContainer);
let clickAction = new Clutter.ClickAction();
clickAction.connect('clicked', action => {
// Only switch to the workspace when there's no application
@ -579,7 +582,7 @@ var WorkspacesDisplay = new Lang.Class({
}
this._workspacesViews.push(view);
Main.layoutManager.overviewGroup.add_actor(view.actor);
this._viewsContainer.add_actor(view.actor);
}
this._updateWorkspacesFullGeometry();