Commit graph

19 commits

Author SHA1 Message Date
Martin Gräßlin
b99e1c0a6b Reduce usage of QCursor::pos() and ::setPos()
Where possible it is changed to Cursor::pos(), where we cannot use the
Cursor class (e.g. Aurorae) we can at least try to limit the usage to
prevent roundtrips to the X server.

REVIEW: 109178
2013-02-27 11:46:30 +01:00
Martin Gräßlin
18cccad806 Introduce a templated animationTime overload for the KConfigXT case
This method can be used to get the animationTime in case a configuration
class generated through KConfigXT is used. In general the configuration
stores the magic value 0 for a property "duration". This magic value
indicates that a hard-coded default value should be used.

So the common logic to test the stored value for 0 and then either pass
the stored value or the default value to animationTime is encapsulated
in this method in a generic way.

A MyEffect can use it in the following way:
animationTime<MyEffectConfig>(200);

BUG: 310646
FIXED-IN: 4.10
REVIEW: 107460
2012-11-25 20:19:31 +01:00
Martin Gräßlin
6d2dfe06e7 Introduce dedicated OpenGL1 and OpenGL2 compositing types
The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.

Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.

The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
2012-09-29 15:33:57 +02:00
Martin Gräßlin
9ac20a382d Use KConfigXT in MagicLamp effect
Thanks to Andrea Scarpino for providing the patch

REVIEW: 106412
2012-09-19 09:29:27 +02:00
Martin Gräßlin
2007a7eab8 Use namespaced parameters in signals
Required to get scripting bindings working.
2012-03-12 21:37:40 +01:00
Thomas Lübking
6355a217c2 Magiclamp: fix integer overflow, cpu waste
BUG: 284738
2011-12-01 13:13:13 +01:00
Martin Gräßlin
fe4329a252 Only call active effects in the effect chain
Each effect is able to declare itself as currently being active,
that is transforming windows or painting or screen or doing anything
during the current rendered frame.

This change eliminates the hottest path inside KWin identified by
callgrind.

REVIEW: 102449
2011-08-29 07:06:58 +02:00
Martin Gräßlin
f213b7da70 Drop KWin::TimeLine from kwineffects
The KWin::TimeLine class was only a small wrapper around QTimeLine
without adding anything to QTimeLine what is not present in QTimeLine.
The initial idea was to make it possible to provide more curve shapes.
This is now obsoleted by Qt shipping more useful curves with QTimeLine.

So let's clean up a little bit and use QTimeLine directly instead of
the small wrapper.

All effects are adjusted to use QTimeLine directly.
2011-03-14 22:50:05 +01:00
Martin Gräßlin
a404ec4259 WindowUnminimized becomes a signal 2011-03-06 11:08:19 +01:00
Martin Gräßlin
012222037e WindowMinimized becomes a signal 2011-03-06 10:55:27 +01:00
Martin Gräßlin
e355700e6e EffectsHandler emits windowDeleted signal
Workspace emits a deletedRemoved signal which the EffectsHandlerImpl translates
into a windowDeleted signal.
2011-02-27 10:47:42 +01:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking
5c3c4b0e24 don't use un/minimization while in fullscreen effect
BUG: 261768

svn path=/trunk/KDE/kdebase/workspace/; revision=1210684
2011-01-01 18:56:12 +00:00
Thomas Lübking
4c392a844d move animation handling to prePaintScreen (like for minimizeanimation), target animation to pointer in case of absent taskbar"
svn path=/trunk/KDE/kdebase/workspace/; revision=1054159
2009-11-25 17:46:50 +00:00
Thomas Lübking
019afbd10a BUG: 177985
BUG: 184859

catch windows closing during the animation

svn path=/trunk/KDE/kdebase/workspace/; revision=1054146
2009-11-25 16:36:44 +00:00
Lucas Murray
8a8428e41c Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042572
2009-10-30 06:51:59 +00:00
Martin Gräßlin
a4a783d94c MagicLamp requires OpenGL.
svn path=/trunk/KDE/kdebase/workspace/; revision=947729
2009-04-01 09:56:01 +00:00
Martin Gräßlin
3c449d81cc New way to determine in which direction to animate the magic lamp. Based on the assumption that icon geometry is part of a panel. Using the panel to find the position is more safe as a the height of a vertical panel is greater than the width. This might not be true for the icon geometry. If the panel is autohidden we still have to use the icon geometry using the assumption that it will border one screen edge. For the unlikely case of bordering two screen edges the wrong animation might be used but it won't be distorted.
There's still the possiblity of distortion if someone places the panel between two screens. But that's hardly possible to catch as it would require to animate parts of the window in one direction and the rest in another direction.
BUG: 183059
BUG: 183099

svn path=/trunk/KDE/kdebase/workspace/; revision=936880
2009-03-08 15:12:55 +00:00
Lucas Murray
846496d2c1 Cleaned up the effects/ directory by moving each individual effect into
its own directory, cleaned up the effect config macros and renamed
"MakeTransparent" to "Translucency" so that it matches its visible name.

svn path=/trunk/KDE/kdebase/workspace/; revision=921749
2009-02-05 15:35:38 +00:00
Renamed from effects/magiclamp.cpp (Browse further)