workspacesView: Fix off-by-one error

This is basically 9f0e7632a6 ported over ed1170906b which was dropped this
fix when copying things around.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1655>
This commit is contained in:
Abderrahim Kitouni 2021-02-09 10:17:29 +01:00 committed by Marge Bot
parent 8e6191b436
commit 9aae1df7a6

View File

@ -167,7 +167,7 @@ class WorkspacesView extends WorkspacesViewBase {
const rtl = this.text_direction === Clutter.TextDirection.RTL; const rtl = this.text_direction === Clutter.TextDirection.RTL;
const adj = this._scrollAdjustment; const adj = this._scrollAdjustment;
const currentWorkspace = vertical || !rtl const currentWorkspace = vertical || !rtl
? adj.value : adj.upper - adj.value; ? adj.value : adj.upper - adj.value - 1;
// Single fit mode implies centered too // Single fit mode implies centered too
let x1 = 0; let x1 = 0;