wlroots/util
John Lindgren 6d197eef94 util: let wlr_box_closest_point() be within 1/65536 of right/bottom edge
Limiting the position to (x + width - 1, y + height - 1) created a 1px
"dead zone" at monitor edges, noticeable with high-resolution mice with
motion deltas of <1px.

See: https://github.com/swaywm/sway/issues/8110

Using (x + width - 1/65536, y + height - 1/65536) instead should make
the "dead zone" small enough to be unobservable, while the value 1/65536
is still large enough to avoid rounding to zero (due to loss of
significant digits) in simple floating-point calculations.

This does expose a client-side bug in Qt layer-shell applications,
noticeable in right/bottom panels which do not accept positions beyond
(x + width - 1, x + height - 1) as valid - thus driving the cursor
to the bottom/right of the screen to click on the panel does not work.
I don't have a good workaround for this, and probably it needs to be
fixed in Qt itself.

Fixes: 3fc66d4525
("util: fix non-linear behavior of wlr_box_closest_point()")
2024-06-25 11:09:33 -04:00
..
addon.c
array.c
box.c util: let wlr_box_closest_point() be within 1/65536 of right/bottom edge 2024-06-25 11:09:33 -04:00
env.c
global.c
log.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
meson.build
rect_union.c
region.c
set.c
shm.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
time.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
token.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
transform.c util/transform: add wlr_output_transform_coords() 2023-11-23 11:07:34 +01:00
utf8.c