mirror of
https://github.com/swaywm/sway.git
synced 2026-04-23 06:46:27 -04:00
Currently, various floating-point expressions involving the coordinates of borders, titlebars and content surfaces are directly assigned to integers, and so they are rounded towards zero. This results in off-by-one distances between these elements when the signs of their coordinates differ. Fixed by wrapping these expressions with a call to floor before the assignment.
This commit is contained in:
parent
1a6471be17
commit
aac1582ea9
2 changed files with 19 additions and 19 deletions
|
|
@ -105,8 +105,8 @@ static bool get_surface_box(struct surface_iterator_data *data,
|
|||
data->rotation);
|
||||
|
||||
struct wlr_box box = {
|
||||
.x = data->ox + _sx,
|
||||
.y = data->oy + _sy,
|
||||
.x = floor(data->ox + _sx),
|
||||
.y = floor(data->oy + _sy),
|
||||
.width = sw,
|
||||
.height = sh,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue