mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-05-09 13:47:22 +00:00
Merge branch 'fix-position' into 'master'
util/box: Calculation error of wlr_box_closest_point in multi-screen mode See merge request wlroots/wlroots!4784
This commit is contained in:
commit
73766494e5
@ -26,7 +26,7 @@ void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
|
||||
|
||||
// find the closest x point
|
||||
if (x < box->x) {
|
||||
*dest_x = box->x;
|
||||
*dest_x = box->x + x - 1/65536.0;
|
||||
} else if (x > box->x + box->width - 1/65536.0) {
|
||||
*dest_x = box->x + box->width - 1/65536.0;
|
||||
} else {
|
||||
@ -35,7 +35,7 @@ void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
|
||||
|
||||
// find closest y point
|
||||
if (y < box->y) {
|
||||
*dest_y = box->y;
|
||||
*dest_y = box->y + y - 1/65536.0;
|
||||
} else if (y > box->y + box->height - 1/65536.0) {
|
||||
*dest_y = box->y + box->height - 1/65536.0;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user