Version: (using KDE 4.1.3)
Installed from: Debian testing/unstable Packages
In KDE4, The behavior of the obscured (background) window has changed. Note this only happens when compositing (all desktop effects) is enabled.
First a little background...
In KDE3- Let us say I have windows a, b and c where a is maximized, b is normal size, and c is minimized.
Let us also say that a is in the foreground. When I RMB click on the taskbar entries for b or c and choose close, they are not brought to the foreground before being closed.
This is the correct behavior.
In KDE4, with the initial conditions same as above, the behavior has changed.
When I RMB click on the taskbar entries for the obscured window, that window is first brought into the foreground and then closed (at least it appears to be that way.
Two noteworthy points here:
1. The minimized window does not do this, it is simply closed. and
2. This behavior only surfaces when I use compositing (Aaron Seigo pointed this out. Thanks Aaron!).
KDE3's obscured window behavior is the correct one. Please use that.
Dev note: Window stacking order is not being remembered after a window is closed so when an effect (Disabling fade prevents it) references a window it is always drawn on top.
*** This bug has been marked as a duplicate of bug 158262 ***