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 util/addon: make wlr_addon_set_finish() safer 2023-10-08 11:06:09 +00:00
array.c util/array: unclutter 2022-08-29 13:48:42 +00:00
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 util/env: make env_parse_switch() return a size_t 2022-12-06 16:14:18 +01:00
global.c util/global: fix memory leak on display destroy in wlr_global_destroy_safe 2022-06-07 18:18:11 +02:00
log.c Define _POSIX_C_SOURCE globally 2024-02-15 15:41:12 +01:00
meson.build util/transform: move over wl_output_transform helpers 2023-11-23 11:03:57 +01:00
rect_union.c util: add struct to track union of rectangles 2023-10-05 11:45:32 +00:00
region.c util/region: forbid "shrinking" a region with wlr_region_expand() 2022-12-09 16:46:36 +00:00
set.c util/set: overhaul 2022-08-29 13:48:42 +00:00
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 xdg-toplevel: check that title provided actually is UTF-8 2023-11-22 22:03:00 +03:00