[gnome-shell] workspace: Properly handle zero spacing in the WorkspaceLayout
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Properly handle zero spacing in the WorkspaceLayout
- Date: Sun, 21 Feb 2021 16:13:30 +0000 (UTC)
commit 51348c6020649e7c98327e4ca139f3565dbb9866
Author: Jonas Dreßler <verdre v0yd nl>
Date: Mon Feb 8 18:58:27 2021 +0100
workspace: Properly handle zero spacing in the WorkspaceLayout
It should be allowed to set this._spacing to 0 and thus pass 0 as
rowSpacing or colSpacing to this._adjustSpacingAndPadding(). The current
if-condition there won't add the oversize to the spacing in case 0 is
passed though.
So change that if-condition and explicitely check for null instead.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1698>
js/ui/workspace.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index ba632153b3..c7021fe5ac 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -463,9 +463,9 @@ var WorkspaceLayout = GObject.registerClass({
const [topOversize, bottomOversize] = window.chromeHeights();
const [leftOversize, rightOversize] = window.chromeWidths();
- if (rowSpacing)
+ if (rowSpacing !== null)
rowSpacing += topOversize + bottomOversize;
- if (colSpacing)
+ if (colSpacing !== null)
colSpacing += Math.max(leftOversize, rightOversize);
if (containerBox) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]