
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
*** 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
10 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 ;-)
10 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
9 years ago
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
thomas12777
9 years ago
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
9 years ago
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
thomas12777
9 years ago
(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
9 years ago
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
thomas12777
9 years ago
-> much fun discussing with the oxygen team then ;-)
(though this could be covered by an overriding effect on the new shadow system)
Report
FSchulz
9 years ago
Report
landice
10 years ago
Report
thomas12777
10 years ago
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
10 years ago
Best regards!
Report
theDecider
10 years ago
Report
thomas12777
10 years ago
(otherwise the module will not be reloaded)
Report
FSchulz
10 years ago
Best regards!
Report
theDecider
10 years ago
Report
FSchulz
10 years ago
Report
FSchulz
10 years ago
Report
thomas12777
10 years ago
Report
traysh
10 years ago
Report
traysh
10 years ago
Report
Contrast
10 years ago
I've already installed xorg-dev. Running KDE 4.5 on Kubuntu 10.04. Any ideas?
Report
thomas12777
10 years ago
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
10 years ago
Report
linuxfever
10 years ago
....
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
thomas12777
10 years ago
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
10 years ago
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