summaryrefslogtreecommitdiff
path: root/beryl-plugins/src/blurfx.c
diff options
context:
space:
mode:
authoronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-16 16:24:32 +0000
committeronestone <onestone@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-16 16:24:32 +0000
commit6de5b4193000488b6b4f9d2cf4282d3e062f207e (patch)
treeecf636b591807897ac1759f9a71498f9da3498dd /beryl-plugins/src/blurfx.c
parent537601748348470c981bf5f273821a89e2afefa3 (diff)
downloadmarex-dev-6de5b4193000488b6b4f9d2cf4282d3e062f207e.tar.gz
marex-dev-6de5b4193000488b6b4f9d2cf4282d3e062f207e.tar.bz2
beryl-plugins: fixed blur cache handling on viewport change, closes #491
git-svn-id: file:///beryl/trunk@656 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'beryl-plugins/src/blurfx.c')
-rw-r--r--beryl-plugins/src/blurfx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/beryl-plugins/src/blurfx.c b/beryl-plugins/src/blurfx.c
index ff78c93..3c58b98 100644
--- a/beryl-plugins/src/blurfx.c
+++ b/beryl-plugins/src/blurfx.c
@@ -2179,13 +2179,22 @@ updateBlurTexture (CompWindow * w, CompScreen * s,
rect.height) *
tm[7] + tm[15];
+ int s_x1 = screenGetOutputDevX (s, bs->output + 1);
+ int s_y1 = screenGetOutputDevY (s, bs->output + 1);
+ int s_x2 = s_x1 + screenGetOutputDevWidth (s, bs->output + 1);
+ int s_y2 = s_y1 + screenGetOutputDevHeight (s, bs->output + 1);
+
if (bbProj[0][0] >= bbProj[1][0] || bbProj[2][0] >= bbProj[3][0]
|| bbProj[2][1] >= bbProj[0][1]
|| bbProj[3][1] >= bbProj[1][1]
|| bbProj[1][0] - bbProj[0][0] < rect.width * 0.5
|| bbProj[3][0] - bbProj[2][0] < rect.width * 0.5
|| bbProj[0][1] - bbProj[2][1] < rect.height * 0.5
- || bbProj[1][1] - bbProj[3][1] < rect.height * 0.5)
+ || bbProj[1][1] - bbProj[3][1] < rect.height * 0.5
+ || bbProj[0][0] < s_x1 || bbProj[1][0] > s_x2
+ || bbProj[2][0] < s_x1 || bbProj[3][0] > s_x2
+ || bbProj[0][1] < s_y1 || bbProj[2][1] > s_y2
+ || bbProj[1][1] < s_y1 || bbProj[3][1] > s_y2)
{
XDestroyRegion (reblurRegion);
XDestroyRegion (blurPaintRegion);