yshui / picom

A lightweight compositor for X11
Other
3.92k stars 576 forks source link

Animation crops right and bottom borders #1264

Closed jdujava closed 1 month ago

jdujava commented 1 month ago

I am trying out slight modification of "appear/disappear" animation https://github.com/yshui/picom/pull/1253#issuecomment-2117492905:

Animation configuration ```conf animations = ({ triggers = ["close", "hide"]; opacity = { timing = "0.2s linear"; start = "window-raw-opacity-before"; end = "window-raw-opacity"; }; blur-opacity = "opacity"; shadow-opacity = "opacity"; offset-x = "(1 - scale-x) / 2 * window-width"; offset-y = "(1 - scale-y) / 2 * window-height"; scale-x = { timing = "0.2s cubic-bezier(0.21, 0.02, 0.76, 0.36)"; start = 1; end = 0.54; }; scale-y = "scale-x"; shadow-scale-x = "scale-x"; shadow-scale-y = "scale-y"; shadow-offset-x = "offset-x"; shadow-offset-y = "offset-y"; }, { triggers = ["open", "show"]; opacity = { timing = "0.2s linear"; start = "window-raw-opacity-before"; end = "window-raw-opacity"; }; blur-opacity = "opacity"; shadow-opacity = "opacity"; offset-x = "(1 - scale-x) / 2 * window-width"; offset-y = "(1 - scale-y) / 2 * window-height"; scale-x = { timing = "0.2s cubic-bezier(0.24, 0.64, 0.79, 0.98)"; start = 0.92; end = 1; }; scale-y = "scale-x"; shadow-scale-x = "scale-x"; shadow-scale-y = "scale-y"; shadow-offset-x = "offset-x"; shadow-offset-y = "offset-y"; }) ```

Almost everything seems to work well, but I noticed that while top/bottom borders are visible through all animation, right/bottom borders are cropped out. Best to view the following slowed down video:

https://github.com/yshui/picom/assets/19737748/73690063-fd6d-4303-b868-9740a7fb8a3e

Is there a way how to avoid this behavior via animation configuration, or perhaps in some other way?

yshui commented 1 month ago

nope, this is a bug.

I think something is wrong in corner radius calculation (although you didn't enable it). the xrender backend does not have this problem until I set a corner radius.