KWin drop shadow patches

Various KDE 1.-4. Improvements

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

0
Become a Fan
5.0

Available as/for:
Description:
These are patches against KDE CVS and KDE 3.1.3 to make KWin able to draw configurable drop shadows under any window--including windows with no window decoration, Noatun with K-Jofol skins, empty Karamba windows, you name it! Drop shadows for active and inactive windows can be configured separately. Drop shadows may also be enabled or disabled for each individual window.

The 0.6.x series is _much_ faster than the 0.5.x series, but still lags on windows with very complex shapes (like the Noatun skin in the 1st preview screenshot). Around 12 seconds on my PIII/800 in the worst case scenario (no cached shadow, low on memory, and CPU already under 100% load). Less than a quarter second in the best case.
Last changelog:

0.6.3a:
- don't show Shadow item in menu when shadows aren't enabled globally
- gray out Shadow item in window menu when shadows are enabled globally but not for that type of window (i.e. if shadows are enabled but not for override windows, the Alt+F3 menu in KNotes will show Shadow as a grayed out menu item). As confusing as that description sounded, it may clarify things in the long run

0.6.3:
- shadows can now be enabled or disabled for individual windows through the window menu (right-click on titlebar or Alt+F3)
- window-specific shadow enabled/disabled setting can be saved across sessions
- Client::setShadowed(bool) public function can be used to enable or disable shadows for individual windows
- fixed bug in KControl module where opacity may be shown as 1% less than what's in the config file
- slightly improved shadow gradient; very thin shadows are now more visible
- updated for KDE 3.1.3

Refer to the CHANGELOG file in the package for changes in older versions.


Ratings & Comments

56 Comments

snakattak3

any chance of a new patch reflecting all the changes in kwin in kde-cvs. Right now i'm using 3.2 beta 1 from cvs, and the 0.6.3a patch isn't working.

nbensa

Seconded. Please someone port this to 3.2

crow

Hi. I love the effect you created. However, I followed the instucts carefully, but the patch failed to apply properly. I had a lot of hunks fail. I'm running 3.1.4 compiled with konstruct. I applied the: kdebase.kwin-kwin_shadow.patch to: ~/konstruct/kde/kdebase/work/kdebase-3.1.4/kwin I'm wondering how I went wrong. Anyone have have any suggestions?

ox2

First: Looks great! Nice job :) It would be cool if the shadow got larger and weaker when you were dragging the window, as if you were lifting it up from the desktop.

snakattak3

damn, I'm away from my computer for a week. I can't wait to get back home to try this new version out. I see you took my requests too from last time :) Hope they didn't give you too much trouble. Thanks again for the hard work and i'll let you know how it works, just in time too for kde 3.1.3 :)

snakattak3

This is fantastic. I just patched kde 3.1.2 using your version 0.6.2 and it seems to work pretty good. I like how you fixed the rounded shadow corners on the bottoms of windows. A few other patches (maybe yours or someone elses) i've seen on kde-look had a wierd notch in the corners of the window shadows, looks excellent now. Keep up the good work. I can only suggest one thing, you should have an option for each window (ala right->click like to shade a window or place it always on top) that can disable or enable shadows. The reason i say this is because there are some karamba themes i'd like shadows for, and some not. Just a suggestion, keep up the excellent work. You are bringing more eye kandy to our favorite desktop :)

Deciare

That's an interesting suggestion and shouldn't be difficult to implement, but how would you access the menu when there's no titlebar on Karamba windows? You could use Alt+F3, but that's less than obvious. I could make a context menu for right-clicking on a shadow, but that'd defeat the purpose of passing through clicks to the window underneath. Hmm...

snakattak3

I guess i didn't think about karamba not having a tile bar. But maybe something along the lines of a hotkey or something to turn of window shadows when you click the window. It might be kinda hard to do somethimg like that though. Maybe talk with the karamba developers and find out what would be the simplest way to go at it from your perspective. Thanks again and keep u pthe good work.

texstar

I got the patch this morning and patched it into kde 3.1.2 and it works perfect so far. Thank you for your good work on kde.

Deciare

In case you're wondering why the 2nd screenshot link doesn't work, replace the ".png" extension in the URL with a ".jpg" extension. I have no clue why it didn't update the filename properly.

Gulliver

I'd like to use this patch, but it isn't available for kdebase-3.1.2 - Could you possibly do a new version of the patch?

mriya3

TransluXent is an implementation of an X Server which uses OpenGL for what would be the graphics card driver. As such it can easily offer translucent windows. http://rzstud1.rz.uni-karlsruhe.de/~unk6/transluxent/index.html

Deciare

Yes, that looks very promising. I might use it, too, if I knew anything about drawing pixmaps without going through Qt's considerably-easier-than-Xlib functions. I guess I'll play with it a bit and see what comes up...

Richardve

That was just an hack and it's already dead.

Richardve

You might want to try using XRender to speedup the drawing.. (the most used color formats are accelerated when using the official NVIDIA Linux driver (and experimental support for XRender is enabled))

yagami

your shadows are really nice :) but i would like to have shadows in all the windows ( active and inactive) but the redraw ( even when shadows are configured equaly ) isnt very good when you change focus over a window could you fix that you can change the focus of a window , but the shadows woundnt redraw ?! ( by focus i mean , active state and inactive state )

Deciare

I agree completely, shadows shouldn't be redrawn for something as simple as changing the active window! Unfortunately, not redrawing would mean painting a second shadow on top of the one that's already there, which would be far less attractive than a mild flicker. I'm looking forward to real translucency in X like everyone else.

manor

Very good job Deciare ! Your screenshots look a lot better than the in the last version :) You reached a visual quality level that is at least equal as the mac shadow ! Wow ! Thanks a lot !

nbensa

Next time, please, use unified diff (diff -urN old/ new/) That'll help me make an ebuild for Gentoo :-) --- client.cpp.orig 2003-04-07 17:44:02.000000000 -0400 +++ client.cpp 2003-05-07 19:53:58.000000000 -0400 @@ -4,6 +4,7 @@ Thanks, Norberto

yf12s

I really like what you've done. Can you tell me if the KDE Core Developers are considering your code for inclusion in kdebase for version 3.2? I can't wait to see it merged. If they aren't, I want to write to them because this is really taking shape, even with your recent speed boosts.

Deciare

I haven't asked on the KDE mailing lists, but from reading http://developer.kde.org/documentation/library/kdeqt/kde3arch/devel-binarycompatibility.html, I don't think they're too keen on incorporating something that's broken binary compatibility 3 times over the past 3 months into the main KDE distro. I'm reasonably confident that I won't have to break BC again, and I'll spend some time soon to see whether I can make it fully binary compatible with CVS HEAD (and, hopefully, the 3.1.x branch as well).

jaasu

I think that there are some ways to make it work better Xfree supports some accelerated features and for example very nice irc application KVIrc http://www.kvirc.net/ seem to do transparency very fast.

Deciare

KVIrc uses a fake translucency technique similar to Konsole. That is, load the desktop's background wallpaper image and offset it by the window's current position. Unfortunately, that doesn't work for window drop shadows because drop shadows can appear on top of windows other than the desktop. (A drop shadow over a Kate window showing a gradient against the desktop wallpaper wouldn't look right.)

kappax

what about making shadows for the new x 4.3 with xrand or whatever it is ?

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

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

KWin drop shadow patches
Deciare
last update date: 21 years ago

Score 5.0

KWin global drop shadow patch
Deciare
last update date: 22 years ago

Score 5.0

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