Merge lp:~vanvugt/compiz/fix-1020830 into lp:compiz/0.9.9

Proposed by Daniel van Vugt
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3542
Merged at revision: 3548
Proposed branch: lp:~vanvugt/compiz/fix-1020830
Merge into: lp:compiz/0.9.9
Diff against target: 185 lines (+25/-23)
7 files modified
debian/compiz-plugins.install (+1/-0)
debian/compiz-plugins.install.armel (+1/-0)
debian/compiz-plugins.install.armhf (+1/-0)
plugins/CMakeLists.txt (+0/-1)
plugins/wallpaper/CMakeLists.txt (+1/-1)
plugins/wallpaper/src/wallpaper.cpp (+19/-19)
plugins/wallpaper/src/wallpaper.h (+2/-2)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1020830
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Sam Spilsbury Approve
Review via email: mp+142082@code.launchpad.net

Commit message

Reintroduced the wallpaper plugin. It was unbuildable from v0.9.8.0 until
now. (LP: #1020830)

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Yay. Happy to have this in as is (as its non-core), only question would be, do you know why:

- window->alpha () && window->type () & CompWindowTypeDesktopMask)
+ window->type () & CompWindowTypeDesktopMask)

The check for alpha () was removed? I believe that was necessary for some reason, something to do with the transparent cube. Or something.

I guess if it was breaking more things than it fixed, then its not worth having.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yeah alpha() appeared to be false (which is correct) so the plugin could not work at all with that check.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~vanvugt/compiz/fix-1020830 updated
3542. By Daniel van Vugt

Remember to install wallpaper for ARM too

Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/compiz-plugins.install'
--- debian/compiz-plugins.install 2013-01-07 09:36:08 +0000
+++ debian/compiz-plugins.install 2013-01-08 05:19:22 +0000
@@ -45,6 +45,7 @@
45debian/tmp/usr/*/compiz/*text.*45debian/tmp/usr/*/compiz/*text.*
46debian/tmp/usr/*/compiz/*titleinfo.*46debian/tmp/usr/*/compiz/*titleinfo.*
47debian/tmp/usr/*/compiz/*trailfocus.*47debian/tmp/usr/*/compiz/*trailfocus.*
48debian/tmp/usr/*/compiz/*wallpaper.*
48debian/tmp/usr/*/compiz/*water.*49debian/tmp/usr/*/compiz/*water.*
49debian/tmp/usr/*/compiz/*widget.*50debian/tmp/usr/*/compiz/*widget.*
50debian/tmp/usr/*/compiz/*winrules.*51debian/tmp/usr/*/compiz/*winrules.*
5152
=== modified file 'debian/compiz-plugins.install.armel'
--- debian/compiz-plugins.install.armel 2013-01-05 07:28:00 +0000
+++ debian/compiz-plugins.install.armel 2013-01-08 05:19:22 +0000
@@ -36,6 +36,7 @@
36debian/tmp/usr/*/compiz/*text.*36debian/tmp/usr/*/compiz/*text.*
37debian/tmp/usr/*/compiz/*titleinfo.*37debian/tmp/usr/*/compiz/*titleinfo.*
38debian/tmp/usr/*/compiz/*trailfocus.*38debian/tmp/usr/*/compiz/*trailfocus.*
39debian/tmp/usr/*/compiz/*wallpaper.*
39debian/tmp/usr/*/compiz/*water.*40debian/tmp/usr/*/compiz/*water.*
40debian/tmp/usr/*/compiz/*winrules.*41debian/tmp/usr/*/compiz/*winrules.*
41debian/tmp/usr/*/compiz/*wobbly.*42debian/tmp/usr/*/compiz/*wobbly.*
4243
=== modified file 'debian/compiz-plugins.install.armhf'
--- debian/compiz-plugins.install.armhf 2013-01-05 07:28:00 +0000
+++ debian/compiz-plugins.install.armhf 2013-01-08 05:19:22 +0000
@@ -36,6 +36,7 @@
36debian/tmp/usr/*/compiz/*text.*36debian/tmp/usr/*/compiz/*text.*
37debian/tmp/usr/*/compiz/*titleinfo.*37debian/tmp/usr/*/compiz/*titleinfo.*
38debian/tmp/usr/*/compiz/*trailfocus.*38debian/tmp/usr/*/compiz/*trailfocus.*
39debian/tmp/usr/*/compiz/*wallpaper.*
39debian/tmp/usr/*/compiz/*water.*40debian/tmp/usr/*/compiz/*water.*
40debian/tmp/usr/*/compiz/*winrules.*41debian/tmp/usr/*/compiz/*winrules.*
41debian/tmp/usr/*/compiz/*wobbly.*42debian/tmp/usr/*/compiz/*wobbly.*
4243
=== modified file 'plugins/CMakeLists.txt'
--- plugins/CMakeLists.txt 2013-01-07 09:36:08 +0000
+++ plugins/CMakeLists.txt 2013-01-08 05:19:22 +0000
@@ -36,7 +36,6 @@
36set (COMPIZ_DISABLE_PLUGIN_REFLEX ON)36set (COMPIZ_DISABLE_PLUGIN_REFLEX ON)
37set (COMPIZ_DISABLE_PLUGIN_THUMBNAIL ON)37set (COMPIZ_DISABLE_PLUGIN_THUMBNAIL ON)
38set (COMPIZ_DISABLE_PLUGIN_STACKSWITCH ON)38set (COMPIZ_DISABLE_PLUGIN_STACKSWITCH ON)
39set (COMPIZ_DISABLE_PLUGIN_WALLPAPER ON)
40set (COMPIZ_DISABLE_PLUGIN_TRIP ON)39set (COMPIZ_DISABLE_PLUGIN_TRIP ON)
4140
42# disable plugins which won't work on ES2 builds41# disable plugins which won't work on ES2 builds
4342
=== modified file 'plugins/wallpaper/CMakeLists.txt'
--- plugins/wallpaper/CMakeLists.txt 2012-05-16 17:44:47 +0000
+++ plugins/wallpaper/CMakeLists.txt 2013-01-08 05:19:22 +0000
@@ -2,4 +2,4 @@
22
3include (CompizPlugin)3include (CompizPlugin)
44
5compiz_plugin (wallpaper PLUGINDEPS composite opengl)5compiz_plugin (wallpaper PLUGINDEPS composite opengl LIBRARIES Xrender)
66
=== modified file 'plugins/wallpaper/src/wallpaper.cpp'
--- plugins/wallpaper/src/wallpaper.cpp 2012-07-31 13:49:40 +0000
+++ plugins/wallpaper/src/wallpaper.cpp 2013-01-08 05:19:22 +0000
@@ -416,7 +416,8 @@
416}416}
417417
418void418void
419WallpaperWindow::drawBackgrounds (GLFragment::Attrib &attrib,419WallpaperWindow::drawBackgrounds (const GLMatrix &transform,
420 const GLWindowPaintAttrib &attrib,
420 const CompRegion &region,421 const CompRegion &region,
421 unsigned int mask,422 unsigned int mask,
422 WallpaperBackgrounds& bg,423 WallpaperBackgrounds& bg,
@@ -428,11 +429,12 @@
428 GLTexture::Matrix matrix;429 GLTexture::Matrix matrix;
429 GLTexture::MatrixList tmpMatrixList;430 GLTexture::MatrixList tmpMatrixList;
430 WallpaperBackground *back = ws->getBackgroundForViewport (bg);431 WallpaperBackground *back = ws->getBackgroundForViewport (bg);
431 GLFragment::Attrib tmpAttrib = attrib;432 GLWindowPaintAttrib tmpAttrib = attrib;
432433
433 tmpMatrixList.push_back (matrix);434 tmpMatrixList.push_back (matrix);
434435
435 gWindow->geometry().reset();436 GLVertexBuffer *vb = gWindow->vertexBuffer ();
437 vb->begin ();
436438
437 tmpMatrixList[0] = back->fillTexMatrix[0];439 tmpMatrixList[0] = back->fillTexMatrix[0];
438440
@@ -451,17 +453,14 @@
451453
452 if (ws->optionGetCycleWallpapers ())454 if (ws->optionGetCycleWallpapers ())
453 {455 {
454 if (fadingIn)456 tmpAttrib.opacity *= fadingIn ? (1.0f - ws->alpha) : ws->alpha;
455 tmpAttrib.setOpacity ((OPAQUE * (1.0f - ws->alpha)) * (attrib.getOpacity () / (float)OPAQUE));
456 else
457 tmpAttrib.setOpacity ((OPAQUE * ws->alpha) * (attrib.getOpacity () / (float)OPAQUE));
458 }457 }
459458
460 if (tmpAttrib.getOpacity () != OPAQUE)459 if (tmpAttrib.opacity != OPAQUE)
461 mask |= PAINT_WINDOW_BLEND_MASK;460 mask |= PAINT_WINDOW_BLEND_MASK;
462461
463 if (gWindow->geometry ().vCount)462 if (vb->end ())
464 gWindow->glDrawTexture(back->fillTex[0], tmpAttrib, mask);463 gWindow->glDrawTexture(back->fillTex[0], transform, tmpAttrib, mask);
465464
466 if (back->imgSize.width () && back->imgSize.height ())465 if (back->imgSize.width () && back->imgSize.height ())
467 {466 {
@@ -469,7 +468,7 @@
469 float s1, s2;468 float s1, s2;
470 int x, y;469 int x, y;
471470
472 gWindow->geometry ().vCount = gWindow->geometry ().indexCount = 0;471 vb->begin ();
473 tmpMatrixList[0] = back->imgTex[0]->matrix ();472 tmpMatrixList[0] = back->imgTex[0]->matrix ();
474473
475 if (back->imagePos == WallpaperOptions::BgImagePosScaleAndCrop)474 if (back->imagePos == WallpaperOptions::BgImagePosScaleAndCrop)
@@ -558,21 +557,23 @@
558 gWindow->glAddGeometry (tmpMatrixList, reg, region);557 gWindow->glAddGeometry (tmpMatrixList, reg, region);
559 }558 }
560559
561 if (gWindow->geometry ().vCount)560 if (vb->end ())
562 gWindow->glDrawTexture (back->imgTex[0], tmpAttrib, mask | PAINT_WINDOW_BLEND_MASK);561 gWindow->glDrawTexture (back->imgTex[0], transform, tmpAttrib, mask | PAINT_WINDOW_BLEND_MASK);
563 }562 }
564}563}
565564
566bool565bool
567WallpaperWindow::glDraw (const GLMatrix &transform,566WallpaperWindow::glDraw (const GLMatrix &transform,
568 GLFragment::Attrib &attrib,567 const GLWindowPaintAttrib &attrib,
569 const CompRegion &region,568 const CompRegion &region,
570 unsigned int mask)569 unsigned int mask)
571{570{
572 WALLPAPER_SCREEN (screen);571 WALLPAPER_SCREEN (screen);
573572
573 bool ret = gWindow->glDraw (transform, attrib, region, mask);
574
574 if ((!ws->desktop || ws->desktop == window) && !ws->backgroundsPrimary.empty() &&575 if ((!ws->desktop || ws->desktop == window) && !ws->backgroundsPrimary.empty() &&
575 window->alpha () && window->type () & CompWindowTypeDesktopMask)576 window->type () & CompWindowTypeDesktopMask)
576 {577 {
577 int filterIdx;578 int filterIdx;
578 GLTexture::Filter saveFilter;579 GLTexture::Filter saveFilter;
@@ -588,18 +589,17 @@
588 ws->gScreen->setFilter (filterIdx, GLTexture::Good);589 ws->gScreen->setFilter (filterIdx, GLTexture::Good);
589590
590 if (ws->optionGetCycleWallpapers () && ws->rotateTimer.active ())591 if (ws->optionGetCycleWallpapers () && ws->rotateTimer.active ())
591 drawBackgrounds (attrib, region, mask,592 drawBackgrounds (transform, attrib, region, mask,
592 ws->backgroundsSecondary, true);593 ws->backgroundsSecondary, true);
593 drawBackgrounds (attrib, region, mask,594 drawBackgrounds (transform, attrib, region, mask,
594 ws->backgroundsPrimary, false);595 ws->backgroundsPrimary, false);
595596
596 ws->gScreen->setFilter (filterIdx, saveFilter);597 ws->gScreen->setFilter (filterIdx, saveFilter);
597598
598 ws->desktop = window;599 ws->desktop = window;
599 attrib.setOpacity (OPAQUE);
600 }600 }
601601
602 return gWindow->glDraw (transform, attrib, region, mask);602 return ret;
603}603}
604604
605bool605bool
606606
=== modified file 'plugins/wallpaper/src/wallpaper.h'
--- plugins/wallpaper/src/wallpaper.h 2010-02-12 19:03:03 +0000
+++ plugins/wallpaper/src/wallpaper.h 2013-01-08 05:19:22 +0000
@@ -132,11 +132,11 @@
132 GLWindow *gWindow;132 GLWindow *gWindow;
133133
134 void134 void
135 drawBackgrounds (GLFragment::Attrib &,135 drawBackgrounds (const GLMatrix &, const GLWindowPaintAttrib &,
136 const CompRegion &, unsigned int,136 const CompRegion &, unsigned int,
137 WallpaperBackgrounds&, bool);137 WallpaperBackgrounds&, bool);
138138
139 bool glDraw (const GLMatrix &, GLFragment::Attrib &,139 bool glDraw (const GLMatrix &, const GLWindowPaintAttrib &,
140 const CompRegion &, unsigned int);140 const CompRegion &, unsigned int);
141141
142 bool damageRect (bool, const CompRect &);142 bool damageRect (bool, const CompRect &);

Subscribers

People subscribed via source and target branches