Commit Graph

33 Commits (73153c861c242813f9439c17a37fb49ee60bf221)

Author SHA1 Message Date
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 39ab2cf29e MouseChanged becomes a signal 2011-03-12 14:37:30 +01:00
Martin Gräßlin 15757e953a TabBox uses signals to notify the effects
EffectsHandlerImpl just forwards the signals from TabBox. In order
to have a valid pointer to the TabBox, the TabBox is now initialized
before compositing in Workspace.
2011-03-06 12:15:16 +01:00
Martin Gräßlin b3a5639967 EffectsHandler and Effect become QObjects
This is in preparation for allowing to connect effects with signals and slots.
2011-02-25 20:25:21 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin 802dd6b5fe Cache the matrix for cube cap mirroring 2011-01-30 14:12:04 +01:00
Martin Gräßlin 8c4db8f734 Say goodbye to Display Lists in cube.
Rotation is now only handled by the QMatrix4x4 m_rotationMatrix,
so no more need for display lists. Resulting in a cleaner code without
differences between OpenGL 1.x and 2.x/GLES.
2011-01-30 14:12:03 +01:00
Martin Gräßlin 75a1ee7aa8 CubeCaps back in GLES mode.
This includes quite some refactoring. For the cube cap a VBO is used
instead of glLists and all the required transformations are moved into
paintCap() which makes paintScreen more clean.
Currently the mirroring of bottom texture is still missing and cylinder
and sphere caps are not yet ported to using VBO.
I wouldn't be surprised if it is broken for legacy GL atm.
2011-01-30 14:12:02 +01:00
Martin Gräßlin e5b6baeda9 Reflection plane in cube effect and GLSL 2011-01-30 14:12:02 +01:00
Martin Gräßlin 82b8faadab Welcome back Cube effect
Currently working:
* cube slide
* basic cube
* rotations
* reflections

Not working:
* Cube Inside effects
* Reflection plane (needs to be done in a shader)
* cube caps
* sphere/cylinder
* filled in areas in multi desktop
2011-01-30 14:12:01 +01:00
Martin Gräßlin e2eebb6503 Refactoring of EffectFrame: EffectFrame becomes an interface just like EffectsHandler and EffectWindow and a concrete EffectFrameImpl in core.
Rendering of the EffectFrame is moved into the scene as Scene::EffectFrame with a concrete implementation in SceneXrender and SceneOpenGL.
A factory method for an EffectFrame is added to the EffectsHandler, which is used by the effects.
Next step: pass the EffectFrame through all effects, so that effects can transform, blur, invert whatever it.

svn path=/trunk/KDE/kdebase/workspace/; revision=1151271
2010-07-18 16:32:37 +00:00
Martin Gräßlin 1ae6878e76 Providing a way to render something inside the cube. Added as an example the glxgears to the test effects.
svn path=/trunk/KDE/kdebase/workspace/; revision=1038868
2009-10-22 07:06:44 +00:00
Laurent Montel 3ce5dd0ffc Fix includes
svn path=/trunk/KDE/kdebase/workspace/; revision=1018077
2009-09-01 07:05:48 +00:00
Martin Gräßlin 37f48027f2 New cube reflection which moves reflection down to touch the cube in its lowest point. Thanks to Michal Srb for the patch. It' really great.
There are two small todos: when mixing manual (mouse) rotation with cursor key rotation or zooming the reflection becomes wrong.
FEATURE: 178611

svn path=/trunk/KDE/kdebase/workspace/; revision=962205
2009-05-01 18:23:53 +00:00
Martin Gräßlin 69b8e33fce Check for the global shortcut in the effects so that the shortcut actually toggles the effect. This is a workaround needed because the keyboard grab disables the global shortcut.
FEATURE: 156155

svn path=/trunk/KDE/kdebase/workspace/; revision=946787
2009-03-30 11:27:57 +00:00
Martin Gräßlin 92484573f2 Effects can be activated at more than one electric border.
FEATURE: 180548

svn path=/trunk/KDE/kdebase/workspace/; revision=946404
2009-03-29 12:57:20 +00:00
Martin Gräßlin f232a830aa Don't use the gl lists when a new window is added. This prevents the added window becoming black.
svn path=/trunk/KDE/kdebase/workspace/; revision=941274
2009-03-19 10:22:04 +00:00
Martin Gräßlin 7fc3bbf39d Drop the multi screen mode where the cube is scaled on one screen. So there is only the span cube on all screens option. The mode is dropped for the following reasons:
* it looks strange
 * it changes the projection matrix which makes the code ugly
 * it never worked with cylinder or sphere
 * it was broken in trunk anyway

svn path=/trunk/KDE/kdebase/workspace/; revision=940977
2009-03-18 15:01:21 +00:00
Martin Gräßlin a6d8bb41bb Reactivating the use of a gl list for painting the cube. The cube is painted once without using the gl list. By that the problem of black windows on other desktops should be solved. If the black window problem appears again the patch will be reverted.
CCBUG: 183905

svn path=/trunk/KDE/kdebase/workspace/; revision=929840
2009-02-22 11:27:08 +00:00
Lucas Murray e03748fba7 Added EffectFrame, a helper class that creates, manages and caches a
Plasma frame object. There are two ways to use this class: The first is
in "static" mode which gives the frame a set geometry and will not
change, the second is an automatic mode that creates the smallest
possible frame around the specified contents. Contents can either be
normal text and/or a QPixmap, useful for displaying the caption and icon
of the currently highlighed window.
Known bugs:
 - Does not detect Plasma theme changes, known to be in the Plasma
   library.
 - Slight graphical glitches, known to be in Qt 4.5.0 RC1.
Untested:
 - What happens when there is no Plasma theme installed.

svn path=/trunk/KDE/kdebase/workspace/; revision=929324
2009-02-21 04:53:13 +00:00
Martin Gräßlin 5025509e3a Distance between 3D windows is determined by the zoom position divided by the number of windows in stacking order when cube is activated.
svn path=/trunk/KDE/kdebase/workspace/; revision=928279
2009-02-19 11:03:40 +00:00
Martin Gräßlin ed311a899d Add an option so that windows can hover above the cube similar to 3D Windows plugin in Compiz. Currently this disables "windows overlapping edges" feature when this option is set (no change when not set).
FEATURE: 184689


svn path=/trunk/KDE/kdebase/workspace/; revision=927550
2009-02-17 20:47:02 +00:00
Martin Gräßlin 4fa09b63b4 Sphere and Cylinder become part of Cube effect. That is much more convenient than having an own effect for each (only loading the shader is actually required).
Btw caps of cylinder and sphere are working correctly again.

svn path=/trunk/KDE/kdebase/workspace/; revision=925809
2009-02-14 09:29:01 +00:00
Lucas Murray 1db192a11d Fixed cube from crashing due to mouse polling if it was activated and
deactivated too quickly.

svn path=/trunk/KDE/kdebase/workspace/; revision=922457
2009-02-07 05:52:25 +00:00
Martin Gräßlin f7f5bc8326 Split cube mode and animation of desktop switching in separate effects: say hello to CubeSlide effect.
svn path=/trunk/KDE/kdebase/workspace/; revision=922342
2009-02-06 18:53:16 +00:00
Martin Gräßlin daa32a53fb Adding mouse wheel support to effects. First one to use is cube effect.
CCMAIL: marco.gulino@gmail.com

svn path=/trunk/KDE/kdebase/workspace/; revision=922031
2009-02-06 09:45:34 +00:00
Martin Gräßlin a3c57fcab0 Option to not animate windows shown on all desktops during desktop switching animation.
svn path=/trunk/KDE/kdebase/workspace/; revision=922030
2009-02-06 09:39:57 +00:00
Martin Gräßlin 7b5a71d2dd Option to not change the opacity of windows in cube mode. That way only the cube (that is the desktops) will be painted in a transparent way.
FEATURE: 182195

svn path=/trunk/KDE/kdebase/workspace/; revision=922029
2009-02-06 09:37:18 +00:00
Martin Gräßlin 642ae708b5 Cube uses the pager layout to animate desktop switching (not the cube mode). This requires some more work including an option to use the old way (ignoring pager layout).
FEATURE: 167752

svn path=/trunk/KDE/kdebase/workspace/; revision=922028
2009-02-06 09:32:16 +00:00
Martin Gräßlin 026c90a983 Option to not animate the panels during desktop switching animation.
FEATURE: 177730

svn path=/trunk/KDE/kdebase/workspace/; revision=922026
2009-02-06 09:27:40 +00:00
Martin Gräßlin 59208e430a Option to invert mouse and cursor keys in cube mode.
FEATURE: 178398

svn path=/trunk/KDE/kdebase/workspace/; revision=922025
2009-02-06 09:24:12 +00:00
Martin Gräßlin a16aba4b05 Merge in the first changes from cube git branch (http://github.com/mgraesslin/kwin/tree/cube):
* Code restructuring and clean-up
 * Use of glLists to store the rotation and painting of the cube. That way things are only calculated when something changed. Painting the cube is still required in each frame as it would break all other effects.
 * Use face culling to paint the cube in the correct sequence.
 * Move loading of all settings to cube effect. In preparation of getting rid of cylinder and sphere classes

Known regression: cylinder and sphere caps are partly broken.

BUG: 171235

svn path=/trunk/KDE/kdebase/workspace/; revision=922023
2009-02-06 09:16:30 +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