mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-29 07:55:59 +01:00
Avoid loss of a fractional part
This commit is contained in:
parent
39c5d93dea
commit
217cf18a4b
1 changed files with 2 additions and 2 deletions
|
@ -437,8 +437,8 @@ struct wlr_output *wlr_output_layout_get_center_output(
|
|||
}
|
||||
|
||||
struct wlr_box *extents = wlr_output_layout_get_box(layout, NULL);
|
||||
double center_x = extents->width / 2 + extents->x;
|
||||
double center_y = extents->height / 2 + extents->y;
|
||||
double center_x = extents->width / 2. + extents->x;
|
||||
double center_y = extents->height / 2. + extents->y;
|
||||
|
||||
double dest_x = 0, dest_y = 0;
|
||||
wlr_output_layout_closest_point(layout, NULL, center_x, center_y,
|
||||
|
|
Loading…
Reference in a new issue