Commit Graph

171 Commits (8426e13f3a4d61ecf2c9d38ccdc10014e17bff97)

Author SHA1 Message Date
Martin Gräßlin f98593d3fb Window Thumbnail support for QML
A new QML item "ThumbnailItem" is registered to the TabBox. The
C++ implementation finds the EffectWindow of the TabBox and adds
itself to the EffectWindow.

While rendering the EffectWindow the information for all registered
ThumbnailItems are extracted and the thumbnail is rendered on top
of the EffectWindow.

This has obvious limitations like you cannot put other QML items
on top of the thumbnail. Nevertheless it works well enough to
be a possible replacement for e.g. BoxSwitch effect.

When compositing is disabled an icon is rendered instead of the
Thumbnail.

One TabBox Layout inspired by BoxSwitch Effect is added. For the
KCM small pre-rendered items are used.

REVIEW: 103039
2011-11-10 14:28:06 +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
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
Arthur Arlt 02e08be5bd Merge signals clientClosed() and unmanagedClosed() to windowClosed()
This commit merges the two signals clientClosed() and unmanagedClosed() to windowClosed() which
is now provided by Toplevel.
The approriate slots in effects.h and effects.cpp were merges as well, since they did the
same.
The direct method calls of the method windowClosed() in SceneOpenGL and SceneXRender were
removed and are now connected to the appropriate signal in windowAdded().
2011-07-05 11:46:13 +02:00
Arthur Arlt b63c9c1af8 Make mothod windowGeometryShapeChanged() a slot
The method windowGeometryShapeChanged() from the class Scene is now a slot. It is now connected to the signal geometryShapeChanged() which is sent from Toplevel instances Client and Unmanaged.
All direct method calls were deleted.
2011-07-05 11:34:12 +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
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 d647950ff0 Do not blur behind EffectFrames with no style 2011-04-27 14:52:04 +02:00
Jan Gerrit Marker 2407b0fbc4 Make present windows effect not preserve space for windows from other activities
REVIEW:101180
CCBUG:242555
2011-04-24 14:26:46 +02:00
Martin Gräßlin ff4297a799 Update copyright
I really should start to add myself to the copyright when I commit
large chunks to the files...
2011-03-16 19:39:10 +01:00
Martin Gräßlin e5e5c4a020 Move push/popRenderTarget to kwingluitls
(De)Activating a FBO is OpenGL specific and does not belong into EffectsHandler.
2011-03-13 14:34:30 +01:00
Martin Gräßlin 16a025d907 Remove dynamic desktop layout
This has never been implemented properly. There is only the boolean
indicating that the desktop layout is dynamic but it is nowhere set
or used. So better remove it.
2011-03-13 14:04:02 +01:00
Martin Gräßlin 9199619969 Remove not implemented add/delete desktop
It is unlikely that anyone will implement it and it is not compatible
to EWMH anyway. So better remove it.
2011-03-13 13:58:00 +01:00
Martin Gräßlin 32c903b05b Rework signals for move/resize windows
First a signal is emitted when the user starts a move/resize operation.
During the move/resize operation each geometry change emits an update signal.
Last but not least a finish signal is emitted.

This eliminates the specific method for geometry updates in drawbound resize
mode.
2011-03-13 12:41:30 +01:00
Martin Gräßlin 640fdc7b6d PropertyNotify becomes a signal 2011-03-12 19:18:19 +01:00
Martin Gräßlin 88d50727ee WindowDamaged becomes a signal 2011-03-12 15:04:22 +01:00
Martin Gräßlin 39ab2cf29e MouseChanged becomes a signal 2011-03-12 14:37:30 +01:00
Martin Gräßlin 911098ee76 WindowGeometryShapeChanged becomes a signal 2011-03-12 12:34:59 +01:00
Martin Gräßlin dcebc7481b ClientGroupItem* become signals
This needs to be improved in core. Currently ClientGroup does not yet
emit signals, as it would be difficult to connect them. Nevertheless
the effects dependency should be removed.
2011-03-06 21:15:09 +01:00
Martin Gräßlin 747afb4225 NumberDesktopsChanged becomes a signal
TODO: connect DesktopChangeOSD also to the signal
2011-03-06 20:10:11 +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 94c301a089 Move connection code to Client and unmanged into own method
--Code Duplication
2011-03-06 11:13:11 +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 edd0950f96 WindowOpacityChanged becomes a signal 2011-03-06 10:30:23 +01:00
Martin Gräßlin eeb10c69d5 Signal for windowUserMovedResize
In core a new signal is added for maximizedState change of client.
Other function calls remain as direct calls for the moment.
2011-02-28 21:03:13 +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 0795ae89ac EffectsHandler emits signal on windowActivated
EffectsHandlerImpl connects to the Workspace signal clientActivated.
The emitting of the signal is slightly moved from before the activation logic
to after the activation logic. This might change behavior in the scripting
component, but the previous code looked wrong.
2011-02-27 10:05:04 +01:00
Martin Gräßlin 0b85768ec5 EffectsHandler emits windowClosed signal
Client and Unmanaged use a signal to notify that they are about to be closed.
The EffectsHandlerImpl is connected to those signals and emits the appropriate
windowClosed signal to which the effects are connected.
2011-02-27 09:25:45 +01:00
Martin Gräßlin ab6f2ba1fd EffectsHandler emits windowAdded signal
All previously existing windowAdded methods are renamed to slotWindowAdded.
EffectsHandlerImpl is connected to Workspace's clientAdded signal, which is
emitted a little bit earlier than the previous direct method call. This might
change behavior.
Another signal is added to Workspace to signal that an unmanaged is added.
2011-02-25 22:06:02 +01:00
Martin Gräßlin c3a076b6a5 EffectsHandler emits desktopChanged signal
The first signal used between EffectsHandler and Effects.
The signal is actually emitted by the EffectsHandlerImpl and only
the interested effects connect to this signal.
EffectsHandlerImpl itself is also notified by a signal from Workspace,
allowing to remove one of the many if (effects) checks.
2011-02-25 20:41:10 +01:00
Martin Gräßlin b265537962 Drop dependency to libplasma from kwineffects library
Since the EffectFrames have been moved into KWin core nothing in the
Effects lib actually used Plasma. The only remaining method is moved
to core as it's not used in the Effects. The Effects itself still
link against Plasma, so nothing changes for them.

The Plasma includes in the kwineffects header seemed to pull in
quite some additional headers, so the includes in some effects have
to be adjusted (most often KConfigGroup). This should speed up the
compilation of the library and the effects.
2011-02-17 19:38:42 +01:00
Martin Gräßlin 0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking 48447a3d26 avoid recreating effectframes/textures on setPosition; correct position after setAlignment
svn path=/trunk/KDE/kdebase/workspace/; revision=1203489
2010-12-04 10:01:57 +00:00
Thomas Lübking 68fbd31ad8 add windowgeometry tip effect, bind it to the general setting and generalize effect feature provide api, thus update resize effect
BUG: 219755

svn path=/trunk/KDE/kdebase/workspace/; revision=1195300
2010-11-10 19:21:56 +00:00
Martin Gräßlin 6353d6ff57 Don't blur behind opaque window decorations.
Adding a new AbilityUsesBlurBehind which can be set by decorations with
alpha channel to request that the background can be blurred. This improves
the situation for our completely opaque default Oxygen decoration.

This change is a behavior change in comparison to 4.5! Translucent decorations do
not get blurred by default any more.
CCMAIL: craig.p.drummond@googlemail.com

svn path=/trunk/KDE/kdebase/workspace/; revision=1195274
2010-11-10 18:33:07 +00:00
Martin Gräßlin 382d5b15d3 Ignore Paint Clipper when rendering to FBO.
See Review Request http://svn.reviewboard.kde.org/r/4329/

svn path=/trunk/KDE/kdebase/workspace/; revision=1191903
2010-11-01 12:09:53 +00:00
Martin Gräßlin 48012c30fe Coding Style++
SVN_SILENT

svn path=/trunk/KDE/kdebase/workspace/; revision=1155057
2010-07-26 20:17:54 +00:00
Martin Gräßlin ef79d4c443 Use the normal Plasma selection to highlight the selected window in boxswitch.
So it is more consistent (in KDE newspeak "elegant") with other selections and as a plus we get rid of all the custom rendering code in boxswitch.

svn path=/trunk/KDE/kdebase/workspace/; revision=1155051
2010-07-26 20:00:04 +00:00
Martin Gräßlin 89c0ea0c8d Pass EffectFrame through all effects, so that they can do something with the frame.
E.g. set a shader to invert it.
CCBUG: 241389

svn path=/trunk/KDE/kdebase/workspace/; revision=1154071
2010-07-24 16:29:16 +00: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
Fredrik Höglund b8815bbae6 Store the custom data in a QHash instead of a QMap, since QHash
should be faster.

svn path=/trunk/KDE/kdebase/workspace/; revision=1130551
2010-05-25 16:56:23 +00:00
Thomas Lübking ffa8b5306c rename EffectsHandler::provideResizeEffect to singular, honor rules (also affecting the sync timer now)
svn path=/trunk/KDE/kdebase/workspace/; revision=1123660
2010-05-06 14:54:34 +00:00
Martin Gräßlin fa7f160cb3 Window specific setting to skip window switchers (tabbox, present windows, desktop grid).
FEATURE: 171192
CCBUG: 179723

svn path=/trunk/KDE/kdebase/workspace/; revision=1122404
2010-05-03 20:04:44 +00:00
Martin Gräßlin f6ebb5d913 Texture scaling in resize effect and disabling the drawbound when the effect is present.
This provides a good resizing performance for users having problems with the live-updating resize.
Patch by Thomas Lübking.

svn path=/trunk/KDE/kdebase/workspace/; revision=1118714
2010-04-25 18:40:04 +00:00
Martin Gräßlin ec8d860c4b Allow effects to change the number of desktops and inform effects when the number of desktops is changed.
svn path=/trunk/KDE/kdebase/workspace/; revision=1108239
2010-03-28 09:04:14 +00:00
Fredrik Höglund 7ad2203084 Expose the decoration inner rect to effects.
svn path=/trunk/KDE/kdebase/workspace/; revision=1102475
2010-03-12 16:33:01 +00:00