Commit Graph

241 Commits (95ff4a2d49d897739f58e931454edf0272798038)

Author SHA1 Message Date
Vlad Zagorodniy 4299b81f65 [effects] Drop the Scale in effect
Summary:
It's superseded by the new scale effect(D13461).

Existing users of this effect will be migrated to the new scale effect.

Depends on D13461

Reviewers: #kwin, #plasma, #vdg, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13462
2018-08-12 10:58:07 +03:00
Vlad Zagorodniy 9d197e8cb6 [effects] Add Scale effect
Summary:
The new effect scales windows as they appear and disappear.

As the the most of window animation effects, it is a monolithic effect,
i.e., if you enable scale effect, it will animate *both* the appearing and
disappearing.

The main difference between the Scale effect and the Scale in effect is
that the Scale in effect only animates windows as they appear. There is
no corresponding "the Scale out" effect, which is odd. Other points that
differentiate the Scale effect from the Scale in effect:

* it is more subtle;
* it doesn't animate the log out screen;
* it doesn't conflict with the Fade effect, etc.

... and overall, the Scale effect supersedes the Scale in effect.

{F5904947}

//Window open animation.//

{F5904948}

//Window close animation.//

{F5905283, layout=center, size=full}

//KCM.//

Test Plan:
* Enabled this effect
* Opened/closed System Settings

Reviewers: #kwin, #plasma, #vdg, davidedmundson

Reviewed By: #kwin, #plasma, #vdg, davidedmundson

Subscribers: ngraham, davidedmundson, fvogt, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13461
2018-08-12 10:57:41 +03:00
Vlad Zagorodniy 8a02a802ae [effects/slide] Add 'Duration' option
Summary:
At the moment, there is no way to tweak duration of the slide animation.
This change adds a configuration module so it is possible to change
the duration.

Test Plan:
* enable virtual desktops
* go to `System Settings > Desktop Behaviour > Desktop Effects`
  and select Slide effect under "Virtual Desktop Switching Animation"
* click settings/options button and change duration

Reviewers: #kwin, #plasma, graesslin

Reviewed By: #kwin, #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9382
2018-01-01 16:54:02 +02:00
Kai Uwe Broulik 1eb950a985 Desaturate non-responsive windows
When an application is not responding, its window is desaturated to communicate this.
Also "(Not Responding)" is added to the title bar.

Differential Revision: https://phabricator.kde.org/D5245
2017-04-05 11:16:23 +02:00
Marco Martin a7b7ce9ec0 new logout effect
Summary:
new logout effect: it's just a slow fade in of the logout
greeter (window is usable immediately tough

Test Plan: logout greeter now fades in without setting the window opacity manually

Reviewers: graesslin, #plasma

Reviewed By: graesslin, #plasma

Subscribers: broulik, plasma-devel, kwin, #kwin

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5045
2017-03-15 17:47:22 +01:00
Martin Gräßlin 2cc55e4077 [effects] Add a colorpicker effect
Summary:
The effect exports itself to DBus as object "/ColorPicker" and provides
an own interface "org.kde.kwin.ColorPicker".

It has one exported method to DBus "pick" which returns a QColor. When
invoked an interactive position picking selection is started. If it ends
the effect reads the color value at the picked position from the OpenGL
color buffer.

This implements T4568.

Reviewers: #kwin, #plasma_on_wayland, broulik

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3480
2016-11-25 09:30:34 +01:00
Martin Gräßlin adfaac4d60 [effects] Show a notification when a screenshot got saved to file
Summary:
Inform the user about the path to where a screenshot got saved through a
notification. This is helpful on the one hand that the user sees that
the screenshot got saved and from a security perspective that the user
is informed when a screenshot is taken through the dbus interface. It
doesn't prevent non-authorized screenshot taking, but at least the user
is informed about it.

Reviewers: #kwin, #plasma, #vdg

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3376
2016-11-16 13:05:49 +01:00
Martin Gräßlin 620663cb28 [effects] Introduce kcfg for SlidingPopups
Summary: Uses the normal animationTime kcfg settings.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3375
2016-11-16 13:05:02 +01:00
Martin Gräßlin 10f641d5d9 [effects] Introduce kcfg for FallApart effect
Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3374
2016-11-16 13:04:44 +01:00
Martin Gräßlin af80a546bf [effects] Drop the logout effect
Summary:
The new logout design doesn't want to have the vignetting. Thus the
logout effect itself doesn't make any sense any more. All that would
still be used is the logout blur which can also be provided by the
blur effect nowadays for fullscreen windows. As the new logout is a
fullscreen window it should use that one.

The logout effect did one more thing: it kept the vignetting and the
blur once the user selected logout. Now without the vignetting this
would be weird and again doesn't make much sense any more.

So overall I think it's better to just drop the logout effect and use
blur effect in normal way. Neat side advantage: it will also work on
Wayland out-of-the-box.

Reviewers: #kwin, #plasma, #vdg

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2553
2016-08-24 10:09:22 +02:00
Martin Gräßlin b7f49244e0 [effects] Add new effect for touch point visualization
Summary:
The new effect is based on the mouse click effect and uses the same
rendering code (this could be improved by merging them better).

Unlike mouse click there is no keyboard shortcut needed to activate:
as soon as the effect is loaded all touch points are visualized.

The visualization creates an animated circle for each touch down
position, motion and up position. The ids are tracked and each touch
id gets the same color. The first ten different touch ids get a
different color. As touch ids are stable the first finger will always
have the same color.

Reviewers: #kwin, #plasma_on_wayland, bshah

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D2464
2016-08-18 10:36:48 +02:00
Marco Martin 82a1b3ee13 Morphingpopups effect, to animate tooltips
this effect, derived from the Maximize one, will
take the place of the manual window position
animation that Plasma tooltip are using.
this should cause less problems as animationg
positions on X is very error prone, plus it's
less jarring when the tooltip sizes changes too,
since that gets animated as well (behavior similar
to Windows7 taskbar tooltips)

REVIEW:126968
2016-02-17 15:03:55 +01:00
Martin Gräßlin 613d76f2df [effects] Combine all shaders in resources
One resource is used for shader version 1.10 and one for version 1.40.

The ideas behind this change is to remove the locating of the shader
sources and also to fix that user provided shaders could be loaded
instead of the original ones (possible attack vector on Wayland).

To simplify the ShaderManager provides a new method call to load the
shader from the resource. This means the effects don't need to
duplicate the check for the shader version any more and also don't
need to duplicate the file reading functionality.

REVIEW: 126905
2016-02-01 08:42:30 +01:00
Martin Gräßlin aa43852301 Remove build checks for gles or gl
Also removes the building of the kwinglesutils, there's only
kwinglutils now.

REVIEW: 125865
2015-11-03 09:29:37 +01:00
Martin Gräßlin 126263b6db Drop the Dashboard Effect
Basically dead code given that Plasma doesn't have a dedicated dashboard
mode anymore and also doesn't set the required window role for it to
work.

By deleting we save one string comparison for each newly opened window.

REVIEW: 125686
2015-10-19 13:56:46 +02:00
Thomas Lübking fb39fafc71 add eye On Screen effect for showing desktop
resembles the homescreen effect on "eye" OS

REVIEW: 122679
2015-04-07 23:59:18 +02:00
Thomas Lübking 0103b0fee6 Add Window Aperture effect for showing the desktop
It moves windows to nearest corners
2015-04-07 23:59:18 +02:00
Thomas Lübking 8d2cd20c19 track cursorshape changes in zoom effect
BUG: 322088
FIXED-IN: 5.3
REVIEW: 122468
2015-02-10 21:42:06 +01:00
Martin Gräßlin 658ff303fe [effects] Support building the effect_builtins without need to link the lib
This change allows to include the effect_builtins.cpp into the build of
e.g. a kcm without having to link against all effects.

The use case for this is when one needs to resolve just the name of an
effect without wanting to hard code the name.
2015-01-29 11:44:47 +01:00
Martin Gräßlin 5e7d1d586c Adjust effects_builtins for new ki18n
* Use ki18n_wrap_ui for ui files
* define TRANSLATION_DOMAIN in CMakeLists.txt
2014-05-05 08:03:54 +02:00
Martin Gräßlin c1b4167598 [effects] Allow Built-In Effects using xcbutils.h
xcbutils.h has quite a few inline only implementations such as Xcb::Atom,
the Wrappers, Xcb::Window and the convenient methods. Thus there is
nothing wrong with using it from the built-in Effects.

Xcb::Atom is used in Glide and Logout Effect to get the atom. To keep the
logic of the existing code it got extended by a bool isValid() which
gets the reply and returns true if the atom is set.

REVIEW: 117587
2014-04-28 14:14:20 +02:00
Martin Gräßlin 484794f046 [kwin] Make built in effects link all libraries privately
REVIEW: 116838
2014-03-26 14:02:16 +01:00
Martin Gräßlin e3179841f3 [kwin] Create an own library for kwinxrenderutils
XRenderUtils are split out of kwineffects and are an own library just
like kwinglutils is an own library.

The library gets always build and is linked in KWin core unconditionally
(as it's used in outline) and conditionally in kwineffects (PaintClipper)
and the built in effects depending on XRender build option.
2014-03-26 14:02:16 +01:00
Martin Gräßlin f9e0a8b597 [kwin] Create one plugin per effect configuration
There are no advantages for the effects KCM to have all the effect
config modules in one plugin.

By having a plugin per effect we can use the KPluginTrader to easily
find the configuration plugin for a given effect and load it.

To make this possible the following changes are done:
* config_builtins.cpp is deleted
* add_subdirectory is used for all effects which have a config module
* toplevel CMakeLists.txt contains the sources again for the effects
  which have a config module, but effects which don't have a config
  module are still included and thus the macro is still used
* plugin created for the config module, name pattern is:
   kwin_effectname_config
* plugin installed to ${PLUGIN_INSTALL_DIR}/kwin/effects/configs
* desktop file adjusted to new plugin name and keyword removed
* desktop file converted to json as meta data and no longer installed
* Uses K_PLUGIN_FACTORY_WITH_JSON
* Macros for config are dropped from kwineffects.h

REVIEW: 116854
2014-03-25 15:37:35 +01:00
Aleix Pol 4b79750f16 Depend on ConfigGui through KConfigSkeleton 2014-03-24 13:02:48 +01:00
Martin Gräßlin c7d986c7fe [kwin] Remove the legacy OpenGL 1 compositing backend
KWin already has a de facto OpenGL 2 dependency through QML. Combined
with the fact that the OpenGL 1 backend is basically unmaintained and
also unused, it's better to remove it for the new major release.

This change includes:
 * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
 * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
   ifdef'ed with it (partially removal of if-else constructs)
 * Removal of CompositingType::OpenGL1Compositing (flags are kept
   as a core flag should get introduced)
 * Driver recommendation for OpenGL1Compositing changed to XRender
   (should be evaluated whether the drivers can provide GL2)
 * Removal of configuration option "GLLegacy"
 * Removal of fooMatrix function in kwinglutils
 * Removal of ARBBlurShader
 * Removal of legacy code path in GLVertexBuffer
 * Removal of GLShaderManager::disable
 * if-blocks with ShaderManager::instance()->isValid() removed

REVIEW: 116042
2014-03-10 08:59:11 +01:00
Martin Gräßlin 9d08d6799a Drop taskbar thumbnail effect
As Plasma components provide a thumbnail which does not use the
effect we can also remove it.

REVIEW: 115922
2014-03-05 14:45:36 +01:00
Martin Gräßlin d8ca2403a1 [kwin] Drop the KWIN_MOBILE_EFFECTS build option
It's no longer needed as there won't be a KWin version specific to
Plasma Active. We want to have runtime adjustments of all parts in
the next version of Plasma.

REVIEW: 116563
2014-03-03 15:22:09 +01:00
Martin Gräßlin 4586767db8 [kwin] Use imported targets for all XCB libs
Requires 04f78489265b6e52cabd2980dfc417abeee3a695 from ECM
2014-02-25 15:48:39 +01:00
Martin Gräßlin 76efe517a7 Turn built-in effects into a library kwin links against
As all effects have always been compiled into the same .so file it's
questionable whether resolving the effects through a library is useful
at all. By linking against the built-in effects we gain the following
advantages:
* don't have to load/unload the KLibrary
* don't have to resolve the create, supported and enabled functions
* no version check required
* no dependency resolving (effects don't use it)
* remove the KWIN_EFFECT macros from the effects

All the effects are now registered in an effects_builtins file which
maps the name to a factory method and supported or enabled by default
methods.

During loading the effects we first check whether there is a built-in
effect by the given name and make a shortcut to create it through that.
If that's not possible the normal plugin loading is used.

Completely unscientific testing [1] showed an improvement of almost 10
msec during loading all the effects I use.

[1] QElapsedTimer around the loading code, start kwin five times, take
average.

REVIEW: 115073
2014-01-24 14:13:59 +01:00
Marco Martin 3a4eb9a093 stub for the background contrast effect
* a copy of the blur shader to become a copy of the background contrast effect
* contrastshader actually doing the light modification
* don't expand/shrink the area
2014-01-23 14:44:00 +01:00
Martin Klapetek 54bc491c46 Port to KF5 renaming changes 2013-12-11 21:41:47 +01:00
Martin Gräßlin 145f0c096f [kwin/effects] Do not use KActionCollections for the global shortcuts
Most effects had a "collection" for one action. We don't need the
action collection, all it was used for is setting the object name.

With the removal of KActionCollection the effects do not need to link
XmlGui any more, though the dependency is still pulled in through
plasma.
2013-12-10 11:45:33 +01:00
Martin Gräßlin c063978591 Adjust to new KGlobalAccel framework 2013-12-10 07:38:54 +01:00
Martin Gräßlin bad6b31a1c [kwin] effects no longer need to link KDE4Support 2013-12-06 07:51:30 +01:00
Jacob Logan ac72e9fb73 Changed debug statements in kwin/effects from qDebug() to qCDebug(KWINEFFECTS)
A new .cpp file is added containing the declaration of the logging
category and compiled into the effects lib.

REVIEW: 114194
2013-11-29 08:47:56 +01:00
Aleix Pol c7556d6992 kde4_add_plugin -> add_library(MODULE) 2013-11-27 16:11:14 +01:00
Martin Gräßlin 9aca68cef1 [kwin/effects] Do not link Qt::Quick for the config modules
Not used.
2013-11-19 12:20:21 +01:00
Aleix Pol 7b110f0671 Improve CMake usage
It's basically a run of the port-cmake.sh script in here, mostly the changes
are the following:
- Using KF5::* targets
- Using the proper macros, following recent developments in frameworks
2013-11-15 13:37:47 +01:00
Aurélien Gâteau 05b6de1002 ${KDE4Support_LIBRARIES} => KF5::KDE4Support
Fixes a few link errors
2013-10-29 13:00:46 +01:00
Sebastian Kügler b68867463e Change KF5::plasma to KF5::Plasma
Library name has changed in plasma-framework to bring it in line with
KF5:CamelCasing naming.
2013-10-16 01:36:56 +02:00
Bhushan Shah 7b9d0c63d0 Fix mistake 2013-10-14 21:01:11 +05:30
Bhushan Shah ba6ff805bf kde4support-- 2013-10-14 20:54:11 +05:30
Martin Gräßlin e3618e8796 [kwin] Follow Qt's OpenGL choice for KWin
As KWin indirectly uses Qt's OpenGL through QtQuick we need to ensure
to not mix OpenGL and OpenGLES. So we have to built KWin only against
OpenGL if Qt is built against OpenGL and we have to built KWin only
against GLESv2 if Qt is built against GLESv2.

This means the kwin_gles binary is no more. There is only kwin which
either links GL or GLESv2.
2013-10-14 09:04:03 +02:00
Sebastian Kügler 4138ba2fd4 Fix linker targets 2013-10-04 22:44:32 +02:00
Martin Gräßlin a63ca0c311 Fix linking and includes
Seems like there were some changes, we need more explicit linking.
2013-10-02 15:23:56 +02:00
Martin Gräßlin 47cc0d77f5 KFooInput -> Q(Double)SpinBox in mouseclick effect config
And with that the effect configs do not need kde4support any more.
2013-09-09 07:47:36 +02:00
Martin Gräßlin caad13ff95 Use new components based Find XCB 2013-09-09 06:03:35 +02:00
Martin Gräßlin 86b9ce67a0 Use QLocale in WindowGeometryEffect 2013-09-05 10:48:30 +02:00
Martin Gräßlin 8051e08361 Add missing target link libraries in kwin/effects 2013-08-23 09:38:44 +02:00