aboutsummaryrefslogtreecommitdiff
path: root/util/region.c
AgeCommit message (Collapse)Author
2022-11-11util/region: constifySimon Ser
2022-05-24util: Fix infinite loop in recursive functionSteven Newbury
When testing Xwayland multi-HiDPI support with Wine + SimCity4 I encountered a 100% CPU lockup from sway. This turned out to be triggering a bug in the wlroots pointer contraint code. region_confine() contains multiple recursive calls where arguments are modified and resubmitted to the function. One of the calls is however made using the original arguments, if/when this triggers it results in the same codepath being followed each loop so the condition always applies. It makes much more sense if this was intended to apply the clamped values x,y instead of the original x1,y1, and indeed this fixes the infinite loop and results in correct behaviour.
2021-07-06move wlr_box from /types to /utilSimon Zeni
2020-06-17util/region: add wlr_region_scale_xySimon Ser
2020-02-17Fix output rotation directionManuel Stoeckl
The Wayland protocol specifies output transform rotations to be counterclockwise and applied to the surface. Previously, wlroots copied Weston and incorrectly made rotations act clockwise on surfaces. This commit fixes that. This change will break compositors which expect transform rotations to be clockwise, and the rare applications that make use of surface transforms.
2019-08-12Simplify checkAntonin Décimo
2018-09-18Fix implicit conversion of floats to ints in calls to ↵Las
pixman_region32_contains_point I do not think the conversion is specifically defined, but on my system and SirCmpwn's the floats are rounded instead of floored, which is incorrect in this case, since for a range from 0 to 256, any value greater or equal to 0 and less than 256 is valid. I.e. [0;256[, or 0 <= x < 256, but if x is e.g. -0.1, then it will be rounded to 0, which is invalid. The correct behavior would be to floor to -1.
2018-09-18Implement pointer-constraints protocol in wlroots and rootstonLas
2018-03-26Fix damage tracking for rotated surfacesemersion
It was broken because the damage extents were rotated about its own center, not about the center of the surface. This adds a new wlr_region_rotated_bounds that rotates regions. This allows us to have only one code path (for both non-rotated views and rotated views) and optimizes rendering for rotated views.
2018-02-19Revert "ELF Visibility"Drew DeVault
2018-02-19Explicitly export EFL symbolsScott Anderson
2018-02-12Reformat all #include directivesemersion
2018-01-30rootston: fix urxvt damage on HiDPI outputsemersion
util/region: add wlr_region_expand
2018-01-26Damage tracking for transformed outputsemersion
2018-01-25rootston: damage tracking scale supportemersion