Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

10
Become a Fan
7.5

Available as/for:
Description:
*** THIS IS COMPLETELY OUTDATED ***

Current versions of KWin have a dfferent shadow system since 4.7
This is only kept for legacy reasons.

DO NOT USE IT ON THOSE.


Since the Oxygen decoration paints it's own shadows, the shadow plugin got pretty stepchilded.

a) it's horribly imperformant (if I play a video it's causing ~2/3 of the kwin cpu load...)
b) it's broken with XRender & translucency
c) it could use some more options ;-)
d) The heavy exponential shadow is maybe nice, but neither realistic (real shdows cast rather sharp borders), nor effective (most of the HUGE shadow is so much translucent that you can hardly see anything of it...)

So I started to work on it.
Not much of a help for oxygen, but most other decorations (QtCurve has deco shadows as well), consistent and (hopefully) less artefact prone ;-P

Ultimately this should go back upstream but testing outside the release cycle won't hurt - i assume

Version 0.1 performance is up to decoration shadows for one window (heavy repaints in a video) but doesn't scale as good, there also might be artefacts left (didn't see any though) but good enough for a first version, i hopefully can speed up things even more
Last changelog:

0.8a
----
- git master GL support, nothing else (notice that kwin 4.7 will have a revamped shadow system anyway)

0.8
----
- fix popup clipping when no desktop window is in use (corner case)
- fix XRender shadows for tiny windows

0.7
---
- add property support to force shadows
- add launcher script to run chromium with this property
- add flag for translucent decorations (aurorae, oxygen) to fix "corner" artefact (will be autodetected with 4.5, but not "implemented" yet)

0.6
---
- fix skip conditions (override property, undecorated ARBG windows)

0.5
---
- fix remaining artefact (with fading windows that exceed the screenarea)
- avoid some useless shadow paints with translucent windows (though quite a corner case)
- add new shot to show off tronhalo mode ;-)

0.4
---
- fix tiny window shadows better ;-)
- fix property system*
- optionally skip maximized windows (on by default, makes sense depending on your desktop setup)
- skip fullscreen windows (e.g. when not redirecting)

* the shadows are supposed to support a _KDE_SHADOW_OVERRIDE property - but they didn't ;-P
set with e.g.:
xprop -f _KDE_SHADOW_OVERRIDE 32a -set _KDE_SHADOW_OVERRIDE 1
unset with:
xprop -f _KDE_SHADOW_OVERRIDE 32a -remove _KDE_SHADOW_OVERRIDE

0.3
----
- even more performance ;-)
- Halo mode
- "fixed" shadow painting for tiny windows and large fuzzyness

0.2
----
++performance;
--artefacts;
* custom colors for active windows (but using plain QPalette::Shadow as default for both and the moment - we'll have to use sth. like additive painting for _real_ halos -> 0.3 ;-)


Ratings & Comments

72 Comments

FSchulz

Hey! When I try to compile it with KDE 4.7rc2, I get the following error: [code] pp:4:0: /home/flo/build/beshadowed/src/beshadowed-kwin-fx/moc_beshadowed.cpp: In Elementfunktion »virtual const QMetaObject* KWin::BeShadowed::metaObject() const«: /home/flo/build/beshadowed/src/beshadowed-kwin-fx/moc_beshadowed.cpp:54:21: Fehler: »QObject« ist mehrdeutige Basis von »KWin::BeShadowed« /home/flo/build/beshadowed/src/beshadowed-kwin-fx/moc_beshadowed.cpp:54:50: Fehler: »QObject« ist mehrdeutige Basis von »KWin::BeShadowed« /home/flo/build/beshadowed/src/beshadowed-kwin-fx/moc_beshadowed.cpp:64: durch frühere Fehler verwirrt, Abbruch make[2]: *** [CMakeFiles/kwin4_effect_beshadowed.dir/kwin4_effect_beshadowed_automoc.o] Fehler 1 make[1]: *** [CMakeFiles/kwin4_effect_beshadowed.dir/all] Fehler 2 make: *** [all] Fehler 2 ==> FEHLER: Ein Fehler geschah in build(). Breche ab ... [/code] I use bespin, so I have no shadow, and now it looks very ugly ;) Best regards!

thomas12777

The effects API of 4.7 has changed in major aspects. KWin 4.7 also has a new shadow system which at least bespin will use (so i intended to let BeShadowed die - shout if you need it for other decorations) Unfortunately it's broken in _all_ release candidated but should work ok in the release, so this is when i'll activate the code. Until then you'll have to live w/o shadows for everything but the oxygen & aurorae decorations (which paint the shadows in the decoration) :-(

FSchulz

Mmmh... sad news... Hope bespin get them in the near future, cause windows without shadows look so ugly ;)... Thanks for your work!

giovanicascaes

Hi! So will there be not a new version? I would like use BeShadowed, 'cause the new KDE shadow system is ugly sometimes :/ BTW, very nice work!

thomas12777

The better approach would be to improve/fix the new shadow system. Any specific requests? (It's a known issue that several windows -like gtk+ popups- do not get shadows. There're efforts to extend the new shadow system in this regard and in doubt i was about to write a plugin that lets you apply -bespin- shadows to selectable windows (Type & Class matches etc.) as interim solution at least (since the Oxygen gtk+ style afaik provides new shadows as well)

giovanicascaes

Hmmm... I would use BeShadowed instead the KDE shadows, but I'll wait until it be improved... I use Oxygen in Qt and GTK, but will try Bespin and see the results ;) Thanks for your work! ;)

thomas12777

In other words you don't like the oxygen shadows? -> much fun discussing with the oxygen team then ;-) (though this could be covered by an overriding effect on the new shadow system)

landice

renderGLGeometry has been removed from the kwin code, so now beshadown cannot compile against git code. Update soon?

thomas12777

KWin's GL backend is getting some serious major changes due to the GLES support. For the moment, you can just copy the function from 4.6 to the head of the sources. I'll assemble an update after the next local branch change - so far i'm waiting for a call up commit some bugfix changes to 4.6 & master.

FSchulz

This doesn't work for me with KDE 4.6. Is there anything you or me can do to fix it, because I like it a lot. Best regards!

thomas12777

I'm using it with 4.6 so i'm pretty sure that it works, but you HAVE to recompile it against the new kwin because the effect library version was bumped and therefore the plugin won't be loaded for the insufficient version. (tagged at compile time - happens to all 3rd party plugins)

theDecider

I can confirm this. I recompiled against kde 4.6 and it's still not working. Kwin window manager said Beshadowed effect could not be activated.

FSchulz

Yes I also tried it before to recompile it, but I get the same error message... If it helps I use Arch.

FSchulz

Ok sorry... I played a little bit with it and I changed the values and saw that it works. Its very strange, because a few hours ago it doesn't, but I did a few updates in the meantime.

thomas12777

did you restart kwin after compiling? (otherwise the module will not be reloaded)

theDecider

Log out/log in, now it works. Why didn't I think of that :) Thank you for pointing that out.

FSchulz

I thought I did it, but obviously I didn't ;). Thanks for your help and work! Best regards!

traysh

Is it possible to use it with Oxygen windeco in KDE 4.5? It does not work for me, I see no shadows unless I enable the Oxygen "native" ones.

traysh

Found it in the new oxygen-settings app!

Contrast

I'm getting the following output when running make: http://pastebin.ca/1920057 I've already installed xorg-dev. Running KDE 4.5 on Kubuntu 10.04. Any ideas?

thomas12777

Errr... on what kind of system are you compiling this? It appears as if XRender isn't linked (what would mean it's ruled out in cmake) but the xrender code is compiled (ie. the definition is set). Since this should both be driven by the same KDE cmake check there's sth. wrong ;-) a) check whether you've XRender at all ldd $(which kwin) | grep -i xrender should paste sth. like "libXrender.so.1 => /usr/lib/libXrender.so.1" b) if you've xrender, you can likely just comment the check in CMakeLists.txt if (X11_Xrender_FOUND) target_link_libraries(kwin4_effect_beshadowed ${X11_Xrender_LIB}) endif (X11_Xrender_FOUND) --> (add two "#") # if (X11_Xrender_FOUND) target_link_libraries(kwin4_effect_beshadowed ${X11_Xrender_LIB}) # endif (X11_Xrender_FOUND) Notice that the check might fail because lXrender is not propagated to ld (see above, seems so.'s spreading broken -dev packages...) you'll then have to replace ${X11_Xrender_LIB} by eg. /usr/lib/libXrender.so.1 (ie. the second part of the link you found by the command above) - but don't do this w/o real need And in this case, maybe inform your distro as well :-\

Contrast

That got it, thanks a lot.

linuxfever

Hello, I get the following error during compilation: .... Scanning dependencies of target kwin4_effect_beshadowed [ 80%] Building CXX object CMakeFiles/kwin4_effect_beshadowed.dir/kwin4_effect_beshadowed_automoc.o [100%] Building CXX object CMakeFiles/kwin4_effect_beshadowed.dir/beshadowed.o /home/giorgos/Desktop/beshadowed-kwin-fx/beshadowed.cpp: In function ‘bool KWin::contains(Atom, QByteArray)’: /home/giorgos/Desktop/beshadowed-kwin-fx/beshadowed.cpp:571: warning: comparison between signed and unsigned integer expre Linking CXX shared module lib/kwin4_effect_beshadowed.so /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status make[2]: *** [lib/kwin4_effect_beshadowed.so] Error 1 make[1]: *** [CMakeFiles/kwin4_effect_beshadowed.dir/all] Error 2 make: *** [all] Error 2 Any ideas what is wrong? Thanks!

thomas12777

you appear to lack a (the...) OpenGL library... but that's unlikely :-\ try ldd $(which kwin) | grep -i gl and watch out for libGL, there should be sth. like libGL.so.1 => /usr/lib/libGL.so.1 (otherwise i'd need to extend the configure script for to search for and conditionally disable openGL support. (it's just quite uncommon on a today desktop, there's usually at least mesa)

linuxfever

thanks for your reply. The output of the command is this: libGL.so.1 => /usr/lib/libGL.so.1 (0x00007fb670a81000) libQtOpenGL.so.4 => /usr/lib/libQtOpenGL.so.4 (0x00007fb66add6000) libnvidia-glcore.so.256.35 => /usr/lib/libnvidia-glcore.so.256.35 (0x00007fb668678000) libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007fb667901000) it seems like I do have the GL library. The command "make" though fails...

Pling
0 Affiliates
Details
license
version 0.8a
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

More Various KDE 1.-4. Improvements from thomas12777:

kconfig
thomas12777
last update date: 11 years ago

Score 6.1

Kontainer
thomas12777
last update date: 11 years ago

Score 7.6

BeClock
thomas12777
last update date: 13 years ago

Score 8.4

Generic Animations (BeGeneric ;-)
thomas12777
last update date: 13 years ago

Score 8.0

BeDistorted
thomas12777
last update date: 13 years ago

Score 7.2

BeFaded
thomas12777
last update date: 14 years ago

Score 6.8

Other Various KDE 1.-4. Improvements:

Slicker Debian Package for Woody
cirrusgr
last update date: 22 years ago

Score 5.0

Konqueror/kdesktop suggestion
PovMan
last update date: 22 years ago

Score 5.0

Biiig buttons
dbojan
last update date: 20 years ago

Score 5.0

Yet Another KControl
Frans
last update date: 21 years ago

Score 5.0

Next window and next/previos window
dbojan
last update date: 20 years ago

Score 5.0

Fantasie Toolbar
katoe
last update date: 19 years ago

Score 5.0