Commit Graph

83 Commits (e8e63452908607ba053de59179ae44db277545af)

Author SHA1 Message Date
Martin Gräßlin c7262e8bd3 Getter/setters for opacity, saturation and brightness in WindowPaintData
The public member variables for opacity, saturation and brightness
are removed in favor for getter and setters. The variables are
moved into a private class. Those are now qreal instead of double.

To make usage inside the effects easier a multiply method is added
which multiplies the current value with passed in factor and returns
the new value in a functional programming style.

This commit is the top-most of a patch series to refactor
ScreenPaintData and WindowPaintData. Other related commits are:
* 0811772
* ebdc7ec
* 2c8dd8d
* 7699726
* 68e0201
* 611cb09

REVIEW: 105141
BUG: 303314
FIXED-IN: 4.10
2012-07-19 18:25:48 +02:00
Martin Gräßlin f723f132ca Drop support for explicit contents opacity from WindowPaintData
No effect has ever made use of contents opacity. Which means it
is not needed. Removing means faster effects as we used to
multiply the value (always 1.0) with the opacity in each frame
for each window.
2012-07-19 18:25:03 +02:00
Martin Gräßlin dd067b075b Split out common part of ScreenPaintData and WindowPaintData
New common d-pointered class PaintData is added which cannot
be instantiated.
2012-07-19 18:25:03 +02:00
Martin Gräßlin a2b0d42916 Replace translation by QVector3D in Screen/Window PaintData 2012-07-19 18:25:03 +02:00
Martin Gräßlin 0eff12eb92 Use QGraphicsScale for scale information in ScreenPaintData 2012-07-19 18:25:03 +02:00
Martin Gräßlin 966047ccd2 Replace custom RotationData with QGraphicsRotation 2012-07-19 18:25:03 +02:00
Martin Gräßlin 30bb8be037 Add activity support to Workspace Script Wrapper and Effects
New properties for the current activity and the available
activities plus related signals in scripts. Signals added to
effects.

BUG: 302060
FIXED-IN: 4.9.0
2012-06-24 18:35:56 +02:00
Thomas Lübking a332bf183b add desktopChanged signal to effects that carries the optionally changing widget
CCBUG: 213847
FIXED-IN: 4.9
2012-05-03 22:56:27 +02:00
Thomas Lübking 3a6095726e Only reserve required electric borders for ElectricAlways
CCBUG: 293011
REVIEW: 104073
2012-05-03 19:48:20 +02:00
Thomas Lübking 590d9b42d8 restrict animationeffect repaints
REVIEW: 103932
2012-05-03 17:52:49 +02:00
Thomas Lübking ab86f0e837 add screen inversion through XF86VidModeSetGammaRamp or XRRSetCrtcGamma
use opengl invert effect as fallback

REVIEW: 104371
2012-04-17 21:11:03 +02:00
Martin Gräßlin 875df96143 Fix exporting of EffectWindowList to scripts 2012-03-12 21:37:42 +01:00
Martin Gräßlin d0beb0b9a2 Make some EffectsHandler methods scriptable 2012-03-12 21:37:41 +01:00
Martin Gräßlin a8d3732240 Adding properties to EffectsHandler 2012-03-12 21:37:41 +01:00
Martin Gräßlin 3af37460f8 Make minimize EffectWindows work through scripting 2012-03-12 21:37:41 +01:00
Martin Gräßlin 98dd3ead43 Make some EffectWindow methods scriptable 2012-03-12 21:37:41 +01:00
Martin Gräßlin 8a74ad380c Some more properties for EffectWindow 2012-03-12 21:37:41 +01:00
Martin Gräßlin e3aaf017c0 Make EffectWindow's activities available to scripts 2012-03-12 21:37:41 +01:00
Martin Gräßlin 5c02d0e41b Define Q_PROPERTIES for EffectWindow 2012-03-12 21:37:40 +01:00
Martin Gräßlin 2007a7eab8 Use namespaced parameters in signals
Required to get scripting bindings working.
2012-03-12 21:37:40 +01:00
Montel Laurent b8478624aa Fix warning 2012-03-02 13:58:39 +01:00
Thomas Lübking d73f2f25ab Revert "restrict AnimationEffect repainting"
Fun with git/rebase ...

This reverts commit ff167657282c8e424984155018a4f4113870c34f.
2012-02-12 17:34:47 +01:00
Thomas Lübking 39fb788103 restrict AnimationEffect repainting
BUMPs Effect API to 183
2012-02-12 17:29:01 +01:00
Philipp Knechtges 239d5757f2 kwin: move/resize events shall not force a repaint of all layers
This patch adds a new function Toplevel::addLayerRepaint, that in contrast
to addWorkspaceRepaint does not invalidate every blur texture cache that
overlaps with that region. As the name suggests it rather invalidates the
to the window associated layer at that position. This is especially useful
in the case of move/resize events in combination with oxygen-transparent,
where the altered window is almost always the topmost window and the blur
texture cache of the windows underneath are unchanged.

For the case of fully opaque windows the behaviour of addLayerRepaint
and addWorkspaceRepaint should be same.

REVIEW: 103906
2012-02-12 16:57:12 +01:00
Thomas Lübking 85635dd485 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:30:22 +01:00
Thomas Lübking bf88ec09ac Revert "fix tabbing"
pushed out of branch, not master - leading to absent revision, found hash collision??

This reverts commit 94b2ad7b85801e37e2df4671cdc4f26b6d7e5506.
2012-02-11 16:29:14 +01:00
Thomas Lübking d245035a17 fix tabbing
BUG: 290959
BUG: 265160
BUG: 229292
BUG: 238279
BUG: 290758
BUG: 222831
BUG: 278275
BUG: 245747
BUG: 230000

BUG: 253697
BUG: 230570
BUG: 265977
BUG: 225337
BUG: 225339

REVIEW: 103855
2012-02-11 16:01:41 +01:00
Philipp Knechtges ba39d1f917 kwin:remove PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_WITHOUT_FULL_REPAINTS
paintSimpleScreen can handle the affected effects now.

REVIEW: 103827
2012-02-09 14:52:25 +01:00
Martin Gräßlin 128ab01c8f Use invoke method for addRepaint* methods
REVIEW: 103567
2012-01-27 08:28:37 +01:00
Martin Gräßlin a38faa4329 Add visibleInClientGroup property 2012-01-27 08:25:21 +01:00
Martin Gräßlin 20add1c656 Add property shaped for hasOwnShape method
Inclusive notify signal.
2012-01-27 08:24:15 +01:00
Martin Gräßlin bfdcbe60f5 Turn isManaged and isDeleted into properties on Toplevel
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.
2012-01-27 08:21:53 +01:00
Martin Gräßlin 18f64bd36d Use invokeMethod for closeWindow 2012-01-27 08:21:52 +01:00
Martin Gräßlin a348df0d34 Use properties in EffectWindow where possible instead of inheritance
If possible use the property to Toplevel or Client instead of the
pure virtual methods. This makes it easier to get a stable ABI.
Adding new methods to the class no longer requires to add a pure
virtual method.

From a performance point of view this change should not matter.
Most EffectWindow methods are not invoked during the repaint chain.
But only in response to an event like a window got added. There the
overhead does not really matter as well the previous implementation
made strong use of dynamic casts which are also not knwon for being
very fast.
2012-01-27 08:21:52 +01:00
Martin Gräßlin 3c59983589 EffectWindow becomes a QObject 2012-01-27 08:21:52 +01:00
Thomas Lübking d845b60c6c change geometry w/o compositor restart
This possibly fails on some (older?) ati chip/driver combos
-> Waiting for bugreports

REVIEW: 103246
2012-01-24 22:27:15 +01:00
Philipp Knechtges 050d991cb1 kwin: simplifying paintSimpleScreen
This patch reduces the number of QRegion and WindowQuadList operations
by drawing the opaque and translucent parts of the window within the
same bottom to top pass.

REVIEW: 103671
2012-01-11 18:04:28 +01:00
Thomas Lübking d3331eed9c export the baseincrement size to the effectwindow and utilize it in the windowgeometry effect
BUG: 283518
REVIEW: 103033
FIXED-IN: 4.8
2011-11-03 21:49:20 +01:00
Thomas Lübking 51ef7518dd add EffectWindow::windowType 2011-09-25 15:08:35 +02: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 5b0d1739c2 Constify methods in MotionManager 2011-08-29 07:06:57 +02:00
Thomas Lübking a2d9ff72aa fix close button side for present windows effect
BUG: 262543

pint desktop as background when including desktop in switcher
BUG: 262137

zoom windows as hover/selection indicaton (1/8 of the screen or 105%)
BUG: 215348
CCBUG: 175521

no closer on "show desktop" desktop
show closer immediately but have it disabled for a short time to allow the user realize it

REVIEW: 101318
2011-08-09 22:57:54 +02:00
Martin Gräßlin 3524e70fe2 Drop EffectsHandler::saturationSupported
Not used by any effect or anywhere in core.
2011-07-05 20:35:32 +02:00
Arthur Arlt 25654f25b8 Removing TopMenu
Since the funtionality of TopMenu did no longer work in KDE4 this feature was
removed from Workspace. Every reference to it was removed as well as commentaries
and documentation.

REVIEW: 101485
2011-06-24 12:27:56 +02:00
Michael Zanetti e1bf590a1c - fixes calculation of WindowMotionManager in case a new destination is set when the window is not at its original position and provide a function to check if windows
are currently moving (by Thomas Lübking)
- make use of new function and bugfix in SlideBack effect
2011-06-20 21:56:56 +02:00
Martin Gräßlin a05ad98896 Remove textureWidth/textureHeight from all Shaders
The uniforms textureWidth and textureHeight were only needed for
normal windows. For everything else it was just 1.0/1.0, that is
normalized.

The makeArrays method is changed to produce normalized texcoords
obsoleting the need for these uniforms. So two uniforms less, one
calculation in vertex shaders less and many many lines of code
removed.

At the same time makeArrays is also adjusted to take care of
yInverted of the texture, which is needed as we no longer can use
the enableUnnormalizedTexCoords which did the yInverted transformation.

REVIEW: 101646
2011-06-19 20:54:13 +02:00
Fredrik Höglund e5ea420e96 kwin: Add an enabledByDefault() function to the effects interface
This makes it possible to decide at runtime if an effect should
be enabled by default.
2011-05-02 02:06:17 +02:00
Martin Gräßlin 98cc15cfac Allow effects to render the outline 2011-04-28 13:49:22 +02:00
Martin Gräßlin 022d7a32a0 Remove binding of selection to styled EffectFrame
This allows to just set the selection on a None EffectFrame so
that only the selection is rendered without blurring the background
and so on.
2011-04-28 13:49:22 +02:00
Martin Gräßlin d647950ff0 Do not blur behind EffectFrames with no style 2011-04-27 14:52:04 +02:00