The code was basically copy'n'pasted to handle both Client and Deleted
requiring to cast the Toplevel to both Client and Deleted to test whether
it is one of those.
This is now changed from runtime to compile time polymorphism. A
templated method is used to start the rendering process for the decos.
This on the one hand simplifies the code and on the other does not
require any dynamic casts any more as we use the available check on
Toplevel whether it is a Client or Deleted.
The method windowType needs actually two implementations:
* one for Clients
* one for Unmanaged
as for Clients also the window rules are checked and hacks are applied
which is both not needed for Unmanaged windows.
To have the Client specific behavior in windowType the function used to
perform two dynamic_casts which made this method one of the most
expensive during compositing, e.g. for ~1000 frames
* called ~43000 times
* ~85000 dynamic casts
* incl. cost of method: 0.24
* self cost of method: 0.05
* incl. cost of the casts: 0.12
After the change to remove the dynamic casts we have for ~1500 frames
in Client::windowType:
* called ~31000 times
* incl. cost of 0.06
* self cost of 0.02
Calls on Unmanaged and Deleted are so low that we do not need to consider
them.
BUG: 306384
FIXED-IN: 4.10
REVIEW: 106349
Ensures that we can access the minimized property in Effects
which want to not animate a closed, minimized window.
Make use of it in the Fade Effect Script to not fade out a
minimized window which would mean showing the actual not
visible window.
BUG: 303891
FIXED-IN: 4.9.0
REVIEW: 105647
This allows to copy the layer to the deleted window in order to
keep the deleted window in the same layer.
Additionally a new layer is added for unmanaged windows.
Property invokes virtual methods returning false by default. Deleted
reimplements the isDeleted and returns true. Client returns true for
isClient. Method is not called isManaged as this is already used
inside Client.
In some unfortunate situations it is possible that a window is deleted
before it is marked ready_for_painting=true. The last point is
especially troublesome for effects that reference the deleted window.
Many thanks to Elias Probst for all the testing.
CCBUG: 290025
CCBUG: 288948
REVIEW: 103733
ok'd by fredrikh.
this code is buggy right now, but I promise to squash the bugs by the 19th :)
svn path=/trunk/KDE/kdebase/workspace/; revision=1125614
As this is a bigger commit I will wait with backporting to 4.3 for something about two or three weeks and will only backport if nobody yells.
BUG: 201780
svn path=/trunk/KDE/kdebase/workspace/; revision=1004096
and not be slowed down by going through compositing. Turned on and no UI option
in the naive hope that it won't cause any real problems. Maybe effects doing
window previews should get API to suspend unredirect though.
svn path=/trunk/KDE/kdebase/workspace/; revision=851742
being v2+ (right now it says just GPL, which according to GPL itself
means any GPL). Decoration clients will come later.
CCMAIL: kwin@kde.org
svn path=/trunk/KDE/kdebase/workspace/; revision=742302
Reverting r700026 and changing floats to doubles again. I'd probably like
to change even the ones interfacing with OpenGL which I've left for now.
svn path=/trunk/KDE/kdebase/workspace/; revision=707987
change slides the old desktop out and the new one in. Should not
be really technically different from the cube.
svn path=/branches/work/kwin_composite/; revision=629163
instances and keeping them around after the window is closed, create
class Deleted as a representation of a closed window.
(Why do I always forget 'svn add'?)
svn path=/branches/work/kwin_composite/; revision=626357