Commit Graph

196 Commits (0795ae89aceba3f3e22e77dbe082c79e4bbeaa31)

Author SHA1 Message Date
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
Martin Gräßlin f6600709de Fix QLatin1String/QString Krazy issues
SVN_SILENT

svn path=/trunk/KDE/kdebase/workspace/; revision=1210598
2011-01-01 09:50:05 +00: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
Anselmo Melo f3a34bd72a Fix build errors when configured without openGL
Changes and introduces some '#ifdef KWIN_HAVE_OPENGL_COMPOSITING'
http://svn.reviewboard.kde.org/r/5903/


svn path=/trunk/KDE/kdebase/workspace/; revision=1198802
2010-11-19 20:14:03 +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 3e689ff201 Cache generated Lanczos textures.
This provides a significant performance improvement especially for Present Windows.
Whenever a lanczos resampling is done the resulted texture is cached, till the
window is damaged or a texture of different size is required. This means that
for a taskbar thumbnail the resampling only occurs once unless the window is damaged
and for present windows it only occurs when the windows are resized and then only
after the windows have already been moved. Highlighting windows does not cause
a resampling any more.
See review request http://svn.reviewboard.kde.org/r/5708/

svn path=/trunk/KDE/kdebase/workspace/; revision=1191874
2010-11-01 10:46:11 +00:00
Luboš Luňák d467d26530 Do not introduce such generic indentifiers like None or Styled
into KWin's global namespace. Morever None already kind of clashes with X's None.
CCMAIL: kde@martin-graesslin.com


svn path=/trunk/KDE/kdebase/workspace/; revision=1170588
2010-09-01 14:15:06 +00:00
Martin Gräßlin eabad32cfb Add cross fade support for text and icon to EffectFrame.
This allows an effect to fade between old and new text/icon. As an example it's added to CoverSwitch.
Currently only supported in OpenGL. XRender might be added, but I'm missing an idea for an effect to add it.
Most effects using EffectFrame require OpenGL anyway.

svn path=/trunk/KDE/kdebase/workspace/; revision=1160252
2010-08-07 14:08:34 +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 20b711e2e8 Use a VBO for rendering an unstyled effect frame.
svn path=/trunk/KDE/kdebase/workspace/; revision=1153932
2010-07-24 08:04:17 +00:00
Martin Gräßlin fa832b7aa7 Cache the icon texture/picture in EffectFrame and use texture from pixmap to load the data in OpenGL mode. Yeah for less pixmap to image to gltexture conversations.
Some effects (boxswitch and flipswitch) still need to be changed to not set the icon in each frame.

svn path=/trunk/KDE/kdebase/workspace/; revision=1152367
2010-07-20 21:11:03 +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
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
Fredrik Höglund 55b5b593b2 Add EffectsHandler::decorationsHaveAlpha().
Effects can use this method to check if the decorations use
the alpha channel.

svn path=/trunk/KDE/kdebase/workspace/; revision=1099522
2010-03-05 18:21:14 +00:00
Lucas Murray 51168e97a4 Keep the logout effect active until KWin is killed or the user cancels
the logout by using new information provided by KSMServer; Allow effects
to read and detect root window property notify events.

svn path=/trunk/KDE/kdebase/workspace/; revision=1083335
2010-02-01 07:44:27 +00:00
Fredrik Höglund b95c6f721c Make it possible for effects to store arbitrary data in EffectWindow.
svn path=/trunk/KDE/kdebase/workspace/; revision=1069539
2010-01-03 17:50:38 +00:00
Martin Gräßlin 2ff73028a0 Make it possible to move windows across screens in desktop grid.
BUG: 213845

svn path=/trunk/KDE/kdebase/workspace/; revision=1051265
2009-11-19 08:34:28 +00:00
Lucas Murray 622828eba4 Fix crash in EffectWindow::visibleInClientGroup() when it's called on a
window that doesn't have a decoration.
BUG: 214757

svn path=/trunk/KDE/kdebase/workspace/; revision=1049896
2009-11-16 03:58:58 +00:00
Lucas Murray a0d07d12a2 Merged r970865:1049322 from /branches/work/kwin-tabbing
Adds window tabbing support to KWin.
FEATURE: 42023

svn path=/trunk/KDE/kdebase/workspace/; revision=1049334
2009-11-15 03:24:04 +00:00
Lucas Murray a6e68a5f6f Revert failed Krazy changes.
svn path=/trunk/KDE/kdebase/workspace/; revision=1043205
2009-11-01 03:36:38 +00:00
Martin Gräßlin 77f0f0eaca Adding the missing pieces for a nice and fast letterbox resizing as a replacement for the drawbound resizing.
Perhaps we should not display the totally ugly drawbound when we have an active resize effect.
CCBUG: 208770
CCBUG: 152638

svn path=/trunk/KDE/kdebase/workspace/; revision=1042711
2009-10-30 14:22:33 +00:00
Martin Gräßlin aff72003dd The TabBox passes KeyEvents to the effects. So we can navigate with left/right/up/down in presentwindows when used as alt+tab effect. Filtering is of course disabled.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042596
2009-10-30 09:16:41 +00:00
Lucas Murray 424d358fd2 Less Krazy warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1042583
2009-10-30 08:10:35 +00:00
Lucas Murray 20f1a79d04 Less warnings please.
svn path=/trunk/KDE/kdebase/workspace/; revision=1031490
2009-10-05 09:47:13 +00:00
Lucas Murray ca9df8caae Add window snapping to the desktop grid effect.
Patch by Caio Marcelo de Oliveira Filho.
FEATURE: 188743

svn path=/trunk/KDE/kdebase/workspace/; revision=1031428
2009-10-05 04:06:20 +00:00
Lucas Murray da37b1f16d Don't const effect proxies.
svn path=/trunk/KDE/kdebase/workspace/; revision=1018656
2009-09-02 02:30:22 +00:00
Thomas Lübking 46def0304e BUG: 167138
make opacity rules actually functional

svn path=/trunk/KDE/kdebase/workspace/; revision=1002997
2009-07-27 13:30:08 +00:00
Martin Gräßlin a26c5b1225 Configurable mouse actions in present windows for clicking a window and desktop.
It's possible to activate a window, exit without activating, bring window to current desktop, send window on all desktops, mimize the window and close the window.
Clicking desktop allows to activate selected window, exit without activating, show the desktop (minimize all apps) and of course do nothing.
FEATURE: 163116

svn path=/trunk/KDE/kdebase/workspace/; revision=988788
2009-06-28 17:17:29 +00:00
Martin Gräßlin fcbd01779a Add support for activating present windows via XAtoms.
Present windows can be activated for all windows of a desktop by setting the atom _KDE_PRESENT_WINDOWS_DESKTOP to the number of desktop or -1 for all desktops.
Another atom _KDE_PRESENT_WINDOWS_GROUP can be used to activate present windows on a group of windows (e.g. tasks applet).
When present windows is deactivated the property on the manager window will be deleted.

svn path=/trunk/KDE/kdebase/workspace/; revision=988110
2009-06-27 10:21:49 +00:00
Lucas Murray 8d09ed341a Remove old decoration shadow API, rename AbilityProvidesShadow and add
support for the new decoration shadow API in the shadow effect.

svn path=/trunk/KDE/kdebase/workspace/; revision=980130
2009-06-11 08:11:13 +00:00
Michael Zanetti 32ef57aae7 Add bool keepAbove() to EffectWindow
svn path=/trunk/KDE/kdebase/workspace/; revision=969232
2009-05-17 18:26:49 +00:00
Lucas Murray 893b0c2c71 Merge DesktopLayout class into Workspace.
svn path=/trunk/KDE/kdebase/workspace/; revision=926020
2009-02-14 15:40:52 +00:00
Lucas Murray dd28e15a1b Allow desktop effects to access the new DesktopLayout class. Replaced
all code that used calcDesktopLayout() so the function could be removed.
Minor changes to the DesktopLayout class itself.

svn path=/trunk/KDE/kdebase/workspace/; revision=925930
2009-02-14 14:49:46 +00:00
Martin Gräßlin 57f57adaa4 Export method hasAlpha() from Toplevel to EffectWindow.
svn path=/trunk/KDE/kdebase/workspace/; revision=923320
2009-02-08 15:47:37 +00:00
Lucas Murray 13c2f21e9d Added EffectWindow::acceptsFocus(). Prevent present windows from
displaying windows that cannot be focused anyway (Such as conky).

svn path=/trunk/KDE/kdebase/workspace/; revision=923091
2009-02-08 08:45:21 +00:00
Lucas Murray 81ffa5aec9 Raise electric border windows when an effect mouse input window is
created to allow effects to be toggled by active screen edges.

svn path=/trunk/KDE/kdebase/workspace/; revision=922121
2009-02-06 14:21:20 +00:00
Lucas Murray a1c82cd52b Added support for inter-effect communication through the use of proxy
classes. Example code has been added to present windows and desktop
grid, if this code is not to be used by KDE 4.3 it should be removed and
added to a test effect instead.

svn path=/trunk/KDE/kdebase/workspace/; revision=922039
2009-02-06 10:15:06 +00:00
Lucas Murray 752d5fa642 Extracted mouse polling out of the composite timer to allow effects to
detect mouse movement and modifier key changes even when KWin is idle.
As the track mouse effect requires polling to always be active disabling
it by default to prevent wasting CPU usage in the default install.

svn path=/trunk/KDE/kdebase/workspace/; revision=919711
2009-02-01 15:16:52 +00:00