BeShadowed

Various KDE 1.-4. Improvements

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

11
7.9
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:

8 years ago

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 ;-)

FSchulz

7 years ago

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!

Report

C

thomas12777

7 years ago

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) :-(

Report

giovanicascaes

7 years ago

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!

Report

C

thomas12777

7 years ago

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)

Report

giovanicascaes

7 years ago

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! ;)

Report

C

thomas12777

7 years ago

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)

Report

FSchulz

7 years ago

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

Report

landice

8 years ago

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

Report

C

thomas12777

8 years ago

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.

Report

FSchulz

8 years ago

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!

Report

theDecider

8 years ago

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.

Report

C

thomas12777

8 years ago

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

Report

FSchulz

8 years ago

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

Best regards!

Report

theDecider

8 years ago

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

Report

FSchulz

8 years ago

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

Report

FSchulz

8 years ago

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.

Report

C

thomas12777

8 years ago

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)

Report

traysh

8 years ago

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.

Report

traysh

8 years ago

Found it in the new oxygen-settings app!

Report

Contrast

8 years ago

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?

Report

C

thomas12777

8 years ago

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 :-\

Report

Contrast

8 years ago

That got it, thanks a lot.

Report

linuxfever

8 years ago

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!

Report

C

thomas12777

8 years ago

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)

Report

linuxfever

8 years ago

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...

Report

8 years ago

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 ;-)

12345678910
8
product-maker deabru Jul 04 2011 8 great
product-maker axed May 16 2011 8 great
product-maker srog Feb 15 2011 8 great
product-maker juank202 Jan 31 2011 8 great
product-maker sxe Jan 30 2011 8 great
product-maker FSchulz Jan 28 2011 8 great
product-maker TommyCZ Jan 08 2011 8 great
product-maker TheRob Oct 17 2010 8 great
product-maker Count:43 Rating: 7.86
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
0.8a
updated Feb 14 2011
added Mar 14 2010
downloads today
0
page views today 4