KWin global drop shadow patch

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

0
5 .0
Description:

A set of patches against KDE 3.1 and KDE CVS to kwin and the Window Decorations kcontrol module to enable Windows- or Mac OS X-styled drop shadows under the active window.

They're based heavily on David Sansome's and noonespecial's work. Have a look at

http://www.kdelook.org/content/show.php?content=5063
http://www.kdelook.org/content/show.php?content=4922

and marvel at their mad eye candy skills.

This should work with any window decoration, but irregularly shaped ones such as Keramik and ModSystem may look a bit weird.

Like most of the dedicated Shadow Coders (ooh, sounds dramatic ;) ) before me, I used a well-known fake translucency technique to draw the drop shadows, which are subject to rendering errors, update desyncs, and the whole doubtful business.

If you have any code or suggestions to contribute, please let me know.

Have fun!
Last changelog:

17 years ago

0.3.1:
- thanks to Piotr Szymanski, a patch is now available for KDE 3.1!

0.3:
- enabled click passthrough for Windows-style drop shadows
- fixed shadow stacking order. In other words, shadows of newly focused but not
raised windows (i.e. wheel scroll or right-click in inactive window) no longer
overlap any windows above it. See 2nd screenshot for an example
- fixed XMMS random crash on startup
- fixed crash when drawing shadow around very small windows (such as XMMS in shade mode)

For a compelte changelog, see the CHANGELOG file in the archive.

python_double

17 years ago

...someone create .deb out of this (for sid etc)... i'd really like to have this :-/

Report

pepillo

17 years ago

hey!
which color-scheme is that? looks really cool to me.

Report

C

Deciare

17 years ago

4 months of tweaking the same 2 hues until it didn't hurt my eyes anymore. ;)

I might post it to KDE-Look as a separate entry later.

Report

Goamaus

17 years ago

girl wonders, if somebody could make a deb-bundle from it?

greetz,
Mona

Report

foobar3

17 years ago

Great, I love this work. And I wonder,
could someone make an rpm, please.

Report

felipe

17 years ago

Ok, I definitively can't check this out by now, I've already done a mess previously because of a strange mix of gcc2.95/3.2 compiled libraries in debian sources, and I don't want to go through that...

Could it be possible to patch the stable 3.1 sources instead? I have them on cdrom and it should be more simple to try and experiment with them =)

Of course just if the changes are compatible with the stable release...

Report

felipe

17 years ago

I obviously intended *MY* debian sources! There's nothing wrong with the official repositories =)

viva Debian!

felipe

Report

WhitePanther5000

17 years ago

Hey, I'm not sure, but it might work to download CVS for kdebase, make -f Makefile.cvs; ./configure --prefix=/usr; cd kwin; make; su -c "make install";

Again, I'm not sure about this, but its worth a try.

Report

felipe

17 years ago

Ok, I downloaded the kwin module from CVS, it is a "sub-module" indeed :-/ I also got kde-common.

I applied the patch and all fine. I was blindly hoping it would compile but I realized there was no Makefile.cvs or anything similar.

I played with some auto-tools (auto[scan,header,conf,make]) but nothing... Please any idea? Am I supposed to download the entire kdebase module?!? nooo... :D

I would very glad if someone could eventually provide me with a binary release of just kwin... I'm on an "almost" standard debian/woody

Thank you

felipe

Report

C

Deciare

17 years ago

I had an old (December 2002) CVS HEAD source tree laying around, so I tried to do what you suggested earlier. It wouldn't work until I also updated kdelibs/kdecore, and my changes to kwin breaks binary compatibility so every window decoration had to be recompiled, but it's working fine now.

I'd suggest getting all of kdelibs and kdebase from CVS to be on the safe side. If you _really_ don't want to do that, I suppose you could get away with hitting Ctrl+C as soon as the main kdelibs and kdebase directories have been checked out. Also check out kdelibs/admin and kdebase/admin. make -f Makefile.cvs might work then.

Anyway, kdelibs + kdebase doesn't take too long to build from scratch. About 5 hours on my PIII/800. You should also build kdeartwork/kwin-styles (binary incompatibility again).

Report

foobar3

17 years ago

this. Someone make an rpm

Report

felipe

17 years ago

Could I download just the kwin module from CVS and patch that? I don't have enough bandwidth to d'load all current kde cvs and I *don't want* to go through a week-long compile on my PIII-450...
Could I simply do that?

ciao

felipe

Report

mosfet

17 years ago

BTW, Liquid doesn't use shaped window decorations so these should work together. I'll be getting a new computer soon and haven't upgraded to HEAD yet, but I'll be giving this a try as soon as I do :)

The main problem I see, and the reason why I haven't put much effort into things like this, is that with the shadow/transparency method I originally developed for Liquid and MegaGradient and was then adopted by KDE doesn't catch changes made to underlying windows. This is okay for popup menus, which aren't displayed for long, but is really rather bad for permanent windows. If a window is displayed for a long time chances are better that the underlying window will change contents and it will look bad. This is why with Liquid when you tear-off menus it shuts off the translucency.

I don't see any easy way around this except for Keith's translucency server, which has been promised for a long time. The other option is to use a transparent stipple. This works okay on high resolution displays but still takes up quite a bit of resources in spite of rather clever optimizations people have made because of the complex mask require.

Report

Version4

17 years ago

give the dude (Keith) a hand with the translucency server. =)

Report

thanatosnl

17 years ago

Transparency will be acheived vis-a-vis a 'transparency server' which I assume tracks changes and tells windows to redraw themselves whenever they're showing stale data in transparent regions? Isn't the high amount of network communication a performance problem? Will developers have to access this server, or will it be abstracted (so that they can just set alpha channel values as they would color)?

Report

C

Deciare

17 years ago

A detailed discussion on the X Translucent Window Extension can be found at http://www.xfree86.org/~keithp/talks/KeithPackardAls2000/index.html . Most of it is over my head, so I won't risk mis-summarising here. ;)

Report

Darkatom

17 years ago

Hi:

I've not have enough time to compile the sources with this patch. Can you tell me if the shadows moves with the window?
Does the window shadow hide when the window is moved, as another window theme does?

Thank you!

Report

C

Deciare

17 years ago

Whenever a window is moved, resized, or loses focus, its shadow disappears until it stops moving, resizing, or regains focus.

The main differences between this and the modified Acqua decoration is that this works with most window decorations and allows you to click through the shadow to get at what's underneath.

Report

Oxidative

17 years ago

I'd also like to see a third shadow type, a "custom" one where you can set the shadow width and opacity (very easy todo, added it myself already to my copy of the code).

Report

C

Deciare

17 years ago

If you could share those changes. ^_^; I've left the shadow-drawing code essentially untouched because I really don't know how to work with it.

Report

Goamaus

17 years ago

"for the sake of simplicity, complete copies of client.h, client.cpp, option.h, option.cpp, kwindecoration.h, and kwindecoration.cpp are included in the archive. If you're feeling adventurous, you can overwrite your versions with those"...
-------------------------------
would be nice, if these files would be there, but I can find only client.h and options.h... I have KDE3.1 on Debian Sid

Report

jimmymallmann

17 years ago

it works here, did you compile from the source?

Report

Goamaus

17 years ago

I use debian unstable packages...

Report

davidsansome

17 years ago

Great work - I was hoping somebody would implement this in KWin :-)
I've got some new code coming soon (next week probably) which fixes the shadows being drawn above other windows, and gives the option of putting shadows on all windows (not just the active one). You could probably add a seperate "Advanced" box to configure this in the kontrol center.
Anyway, well done :-)

Report

C

Deciare

17 years ago

I don't mean to leech, but your improvements are sounding better by the second. :)

Another good addition would be the ability to pass clicks through the shadow to the widget that's under it (i.e. a drop shadow of a window just above the taskbar won't prevent you from clicking on the taskbar buttons). I haven't been able to do this, but I got the shadow to remove itself when clicked so that a second click will get you what's under it. I need a way to simulate clicks at the pointer's current global X Y coordinates...

Report

17 years ago

0.3.1:
- thanks to Piotr Szymanski, a patch is now available for KDE 3.1!

0.3:
- enabled click passthrough for Windows-style drop shadows
- fixed shadow stacking order. In other words, shadows of newly focused but not
raised windows (i.e. wheel scroll or right-click in inactive window) no longer
overlap any windows above it. See 2nd screenshot for an example
- fixed XMMS random crash on startup
- fixed crash when drawing shadow around very small windows (such as XMMS in shade mode)

For a compelte changelog, see the CHANGELOG file in the archive.

12345678910
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
File (click to download) Version Description PackagetypeArchitecture Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.3.1
updated Mar 11 2003
added Feb 25 2003
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0