PDA

View Full Version : Patch to fix the Screensaver Plugin against the new action system


SmSpillaz
August 27th, 2007, 02:14 AM
I've already sent this to Pafy, the person who created screensaver, but in the meantime - if you *must* be able to toggle screensaver with a key, I have patched it to allow that.

Save it to your screensaver Git directory, and apply it with

git apply 0001-Fix-For-New-Action-Types.patchGood luck!

-SmSpillaz

Big Ben
October 20th, 2007, 02:14 PM
smsplillaz,

Thanks for the patch, but I can't get it to work. I get the following:
ben@ben-desktop:~/screensaver$ git apply 0001-Fix-For-New-Action-Types.patch
Adds trailing whitespace.
0001-Fix-For-New-Action-Types.patch:50: </group>
error: patch failed: screensaver.cpp:357
error: screensaver.cpp: patch does not apply
error: patch failed: screensaver.xml.in:12
error: screensaver.xml.in: patch does not apply

And I get the same error on make I've been getting since upgrading to gutsy:
ben@ben-desktop:~/screensaver$ make
compiling : screensaver.cpp -> build/screensaver.loscreensaver.cpp: In function 'int screenSaverInitDisplay(CompPlugin*, CompDisplay*)':
screensaver.cpp:371: error: 'screensaverSetInitiateKeyInitiate' was not declared in this scope
screensaver.cpp:372: error: 'screensaverSetInitiateButtonInitiate' was not declared in this scope
screensaver.cpp:373: error: 'screensaverSetInitiateEdgeInitiate' was not declared in this scope
make: *** [build/screensaver.lo] Error 1


Any idea what I could be doing wrong?

Or should I just wait and hope Pafy finds the time to fix the plugin? This was one of my favorite features when I first tried compiz fusion (in fact, it was one of the features that made me want to upgrade from Beryl) and I'd love to have it back.

shame
October 27th, 2007, 09:21 PM
Assuming you are using the default compiz fusion in Gutsy, it's the stable version and I don't believe screensaver will work on the stable compiz version (0.6.0).

Big Ben
October 28th, 2007, 11:19 AM
Thanks, Shame, but I'm not using the gutsy default. I compiled from git (using one of the scripts). I was able to get 3d windows and other unsupported plugins to work, so I'm definitely not working with the stable version. Everything works great except the flying windows screensaver.

shame
October 28th, 2007, 11:27 AM
Well the patch shouldn't be needed anymore but you will need at least x11proto-scrnsaver-dev and libxss-dev packages installed along with the compiz-dev package and probably compiz-bcop

Big Ben
October 29th, 2007, 11:37 PM
Shame,
It turns out I didn't have compiz-bcop or compiz-dev installed. But even after installing them, I get the same errors I pasted above when I try to make or to install the patch.

some-guy
October 30th, 2007, 01:33 PM
if you have x11proto-scrnsaver-dev and libxss-dev then try this (http://somelinuxguy94.googlepages.com/screensaver-0.6.0.tar.gz)
(that's the tarball cyberorg used in his 0.6.0 packages :D)

Big Ben
October 30th, 2007, 02:32 PM
Thanks, some-guy.

I downloaded the tarball and tried to compile it, but I get a bunch of errors. (too long to paste the whole thing, but here's the beginning and end.)
ben@ben-desktop:~/screensaver-0.6.0$ make
compiling : flyingwindows.cpp -> build/flyingwindows.loIn file included from flyingwindows.h:4,
from flyingwindows.cpp:1:
screensaver_internal.h:5:18: error: cube.h: No such file or directory
vector.h: In member function 'Vector Vector::toScreenSpace(CompScreen*) const':
vector.h:37: error: invalid use of undefined type 'struct _CompScreen'
/usr/local/include/compiz/compiz.h:47: error: forward declaration of 'struct _CompScreen'
vector.h:38: error: invalid use of undefined type 'struct _CompScreen'
/usr/local/include/compiz/compiz.h:47: error: forward declaration of 'struct _CompScreen'
vector.h: In member function 'Vector Vector::toCoordsSpace(CompScreen*) const':
vector.h:46: error: invalid use of undefined type 'struct _CompScreen'
/usr/local/include/compiz/compiz.h:47: error: forward declaration of 'struct _CompScreen'
vector.h:47: error: invalid use of undefined type 'struct _CompScreen'
/usr/local/include/compiz/compiz.h:47: error: forward declaration of 'struct _CompScreen'
matrix.h: At global scope:
matrix.h:15: error: expected ',' or '...' before '*' token
matrix.h:15: error: ISO C++ forbids declaration of 'CompTransform' with no type
matrix.h: In constructor 'Matrix::Matrix(int)':
matrix.h:15: error: 'mat' was not declared in this scope
matrix.h: In member function 'Matrix& Matrix::rotate(float, float, float, float)':
. . .

flyingwindows.cpp:314: error: invalid use of undefined type 'struct _CompWindow'
/usr/local/include/compiz/compiz.h:48: error: forward declaration of 'struct _CompWindow'
flyingwindows.cpp:315: error: invalid use of undefined type 'struct _CompWindow'
/usr/local/include/compiz/compiz.h:48: error: forward declaration of 'struct _CompWindow'
flyingwindows.cpp:315: error: invalid use of undefined type 'struct _CompWindow'
/usr/local/include/compiz/compiz.h:48: error: forward declaration of 'struct _CompWindow'
flyingwindows.cpp:315: error: invalid use of undefined type 'struct _CompWindow'
/usr/local/include/compiz/compiz.h:48: error: forward declaration of 'struct _CompWindow'
flyingwindows.cpp:325: error: invalid use of undefined type 'struct _CompWindow'
/usr/local/include/compiz/compiz.h:48: error: forward declaration of 'struct _CompWindow'
flyingwindows.cpp: At global scope:
flyingwindows.cpp:328: error: 'Bool' does not name a type
make: *** [build/flyingwindows.lo] Error 1
What have I done wrong this time?

Big Ben
November 5th, 2007, 09:52 AM
Just to put a bookend on my threadjack: I managed to break compiz completely doing uninformed tweaking to try to get this to work, to the point where even reinstalling from git couldn't get back basic functionality. I ended up removing everything compiz-related from my system and reinstalling using this how-to:
http://phorolinux.com/how-to-install-compiz-fusion-060-from-sources-on-ubuntu-710-gutsy-gibbon.html

Now everything works perfectly, including screensaver and 3d windows!

Thanks for the help, Shame and Some-guy.

shafin
January 12th, 2008, 06:49 AM
Thanks for the link