mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-html5
synced 2025-12-29 17:20:28 +00:00
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>
This commit is contained in:
parent
7b8f595b8f
commit
8ab92d030e
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user