diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2019-02-28 22:50:50 +0100 |
---|---|---|
committer | Marco Trevisan <mail@3v1n0.net> | 2019-03-01 17:46:49 +0000 |
commit | f4c2b69934e05c4e308256247109b9610a8d085e (patch) | |
tree | 03a5e03a553b98af5b1e99f27ff7356d732e48ed | |
parent | d7ec5d3022613bcce0366a5ae4ee53ba0c581175 (diff) | |
download | mutter-f4c2b69934e05c4e308256247109b9610a8d085e.tar.gz |
stage: Clamp to pixel the redraw clip taking care of the floored coords
When we floor the quad coordinates then we've also to enlarge the quad by the
difference between the floored value and the actual coordinate, otherwise
we'd end up in a smaller quad.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/3
-rw-r--r-- | src/backends/meta-stage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c index f536fc23a..425926a7c 100644 --- a/src/backends/meta-stage.c +++ b/src/backends/meta-stage.c @@ -225,6 +225,11 @@ queue_redraw_clutter_rect (MetaStage *stage, .height = ceilf (rect->size.height) }; + /* Since we're flooring the coordinates, we need to enlarge the clip by the + * difference between the actual coordinate and the floored value */ + clip.width += ceilf (rect->origin.x - clip.x) * 2; + clip.height += ceilf (rect->origin.y - clip.y) * 2; + clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip); } |