summaryrefslogtreecommitdiff
path: root/plugins/unityshell
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-15 18:47:36 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-15 18:47:36 +0100
commitbe75c102a927639cdec31c40189b543174049cf1 (patch)
tree82bb8bd56a509267fc17aa9a0f8a1771f3f96cbe /plugins/unityshell
parente4a0876b0178a461c97b10fdb89e8e10146390c7 (diff)
UnityScreen: translate the output geometry before intersecting with the blur geo
Othewise if we have monitors smaller than the screen height we'd copy the wrong part of the backup texture to be blurred. (bzr r3347.5.12)
Diffstat (limited to 'plugins/unityshell')
-rw-r--r--plugins/unityshell/src/unityshell.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 8f9a47600..3cb4cb50a 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -781,11 +781,15 @@ void UnityScreen::paintDisplay()
CompRegion blur_region;
auto const& blur_geometries = BackgroundEffectHelper::GetBlurGeometries();
- for (auto blur_geometry : blur_geometries)
+ for (auto const& blur_geometry : blur_geometries)
{
- blur_geometry.y = screen->height() - (blur_geometry.y + blur_geometry.height);
- auto const& blur_rect = CompRegionFromNuxGeo(blur_geometry);
- blur_region += (blur_rect & CompRegionRef(output->region()));
+ auto blur_rect = CompRectFromNuxGeo(blur_geometry);
+ blur_rect.setY(screen->height() - (blur_geometry.y + blur_geometry.height));
+
+ CompRect translated_output(*output);
+ translated_output.setY(screen->height() - output->height() - output->y());
+
+ blur_region += (blur_rect & translated_output);
}
/* Copy from the read buffer into the backup texture */