mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-27 07:58:07 -04:00
render: overlay: fix visual glitches when double buffering
When rendering the overlay for scrollback search, the logic assumed
buffer re-use. On some compositors this isn’t happening (on
e.g. KDE/plasma we’re forced to double buffer).
This resulted in matches not being highlighted correctly.
The problem is in how we calculated the region for which areas to
clear ("un-dim"). It uses the "previous frame’s see-through area"
minus the current frame’s see-through area.
However, when we’ve detected that the current buffer isn’t the same as
the last one, we set the last frame’s see-through region to "the
entire buffer". Thus, when calculating the diff, we end up with an
empty region, and nothing is highlighted.
Fix by simply using the current frame’s see-through region as-is when
we’ve detected we’re not re-using the last frame’s buffer.
This commit is contained in:
parent
4340f8a3b4
commit
3be44fb316
2 changed files with 22 additions and 10 deletions
|
|
@ -74,6 +74,9 @@
|
|||
* Glitchy rendering when scrolling in the scrollback, on compositors
|
||||
that does not allow Wayland buffer re-use (e.g. KDE/plasma)
|
||||
([#1173][1173])
|
||||
* Scrollback search matches not being highlighted correctly, on
|
||||
compositors that does now allow Wayland buffer re-use
|
||||
(e.g. KDE/plasma).
|
||||
|
||||
[1173]: https://codeberg.org/dnkl/foot/issues/1173
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue