diff options
author | Cédric Bosdonnat <cbosdonnat@suse.com> | 2019-02-14 10:44:55 +0100 |
---|---|---|
committer | Jeremy White <jwhite@codeweavers.com> | 2019-02-14 12:46:13 -0600 |
commit | 8ab92d030e05b93aa97a083a8e89fd90d8c85ccd (patch) | |
tree | 072209874afea3f6b70cc1816835afc08d7211c3 | |
parent | 7b8f595b8f5a58c2be472001e4afaa8be50b56ad (diff) |
resize_helper: round sizes down
If we round up, we may end up with a display slightly bigger than what
the window can have, thus adding scroll bars. When rounding down we
avoid this problems.
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
-rw-r--r-- | src/resize.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resize.js b/src/resize.js index c8d87d9..b88666f 100644 --- a/src/resize.js +++ b/src/resize.js @@ -58,13 +58,13 @@ function resize_helper(sc) } - /* Xorg requires height be a multiple of 8; round up */ + /* Xorg requires height be a multiple of 8; round down */ if (h % 8 > 0) - h += (8 - (h % 8)); + h -= (h % 8); - /* Xorg requires width be a multiple of 8; round up */ + /* Xorg requires width be a multiple of 8; round down */ if (w % 8 > 0) - w += (8 - (w % 8)); + w -= (w % 8); sc.resize_window(0, w, h, 32, 0, 0); |