[Regression 3.38] Visual glitches on repaint with fractional scaling on Wayland
Affected version
mutter 3.38 and master
Bug summary
When using fractional scaling on Wayland, there are some visual glitches on widget repaint.
A sort of black boundign box appears for a fraction of a second around the area being repainted.
Steps to reproduce
- Enable fractional scaling in Wayland
- Set a scale like 175%
- Hover the window decoration buttons
What happened
A black box appears around the area beign repainted at times.
What did you expect to happen
Glitch free repaints of widgets,
Relevant logs, screenshots, screencasts etc.
This is a regression in mutter 3.38/master, mutter 3.36 was fine.
A git bisct gives:
30809665d84ac1a74c8787219579e65b5d1e612f is the first bad commit
commit 30809665d84ac1a74c8787219579e65b5d1e612f
Author: Daniel van Vugt <daniel.van.vugt@canonical.com>
Date: Thu Jul 9 16:52:07 2020 +0800
background-content: Explicitly distinguish stage space from actor space
`meta_background_content_paint_content` was mixing two different
coordinate systems in `actor_pixel_rect`. It was initialized with
actor-local coordinates and then `if (self->clip_region)` would be
treated as stage coordinates. This worked because `self->clip_region`
was only non-NULL outside of the overview where both coordinate systems
were the same. So it always got the right answer, possibly by accident.
In order to enhance the function however we will need to know which
coordinate system we're working in, so now we make it explicit.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1363
src/compositor/meta-background-content.c | 62 +++++++++++++++++++++++---------
1 file changed, 45 insertions(+), 17 deletions(-)
CC: @vanvugt