switcherPopup: Bind to the stage, not the monitor

The switcher popup is a large, mostly transparent actor that
should cover all the clickable area of GNOME Shell. In Clutter
terms, it should cover the whole stage.

By binding it to the primary monitor, the Alt+Tab behavior
becomes a bit inconsistent. For example, by not hiding when
clicking at empty spaces at other monitors.

Fix that by binding the SwitcherPopup to the whole stage,
and not only the primary monitor.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/647
This commit is contained in:
Georges Basile Stavracas Neto 2018-10-10 17:46:26 -03:00
parent 0f542c2e16
commit c0b561dd4a
No known key found for this signature in database
GPG Key ID: 886C17EE170D1385

View File

@ -11,7 +11,6 @@ const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const St = imports.gi.St; const St = imports.gi.St;
const Layout = imports.ui.layout;
const Main = imports.ui.main; const Main = imports.ui.main;
const Tweener = imports.ui.tweener; const Tweener = imports.ui.tweener;
@ -65,7 +64,10 @@ var SwitcherPopup = new Lang.Class({
this._initialDelayTimeoutId = 0; this._initialDelayTimeoutId = 0;
this._noModsTimeoutId = 0; this._noModsTimeoutId = 0;
this.add_constraint(new Layout.MonitorConstraint({ primary: true })); this.add_constraint(new Clutter.BindConstraint({
source: global.stage,
coordinate: Clutter.BindCoordinate.ALL,
}));
// Initially disable hover so we ignore the enter-event if // Initially disable hover so we ignore the enter-event if
// the switcher appears underneath the current pointer location // the switcher appears underneath the current pointer location