appDisplay: Disable overshoot gesture in multi-monitor setups

The "bump against monitor edge" thing can't work when there's a monitor
adjacent to the current one, so just disable the gesture in case there's
more than a single monitor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2581>
This commit is contained in:
Jonas Dreßler 2022-12-16 12:09:00 +01:00 committed by Marge Bot
parent 560565d828
commit eacc55334f

View File

@ -868,6 +868,11 @@ var BaseAppView = GObject.registerClass({
} }
_dragMaybeSwitchPageImmediately(dragEvent) { _dragMaybeSwitchPageImmediately(dragEvent) {
// When there's an adjacent monitor, this gesture conflicts with
// dragging to the adjacent monitor, so disable in multi-monitor setups
if (Main.layoutManager.monitors.length > 1)
return false;
// Already animating // Already animating
if (this._adjustment.get_transition('value') !== null) if (this._adjustment.get_transition('value') !== null)
return false; return false;