Commit Graph

118 Commits (054ccc389899acf1f15001105e8b03a4ffb203d0)

Author SHA1 Message Date
l10n daemon script 3b3aa82f58 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-07-23 05:24:40 +02:00
l10n daemon script 6b0d2fc027 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2018-06-18 05:35:02 +02:00
Martin Gräßlin 3f238470c8 [effects/wobblywindows] Move computeVectorBounds into ifdef section
Fixes unused function warning with clang.
2017-07-31 17:58:57 +02:00
Martin Gräßlin 2132b1e0c8 [effects] Use arg="true" in the kcfg files
Summary:
By changing all kcfg to have arg="true" we can pass in the same
KSharedConfigPtr into all effects. This allows to have fake config in
the tests and in the planned effect demo mode.

Also it means that we don't have to hardcode the name kwinrc into the
files. In the configs - where we cannot access the effectshandler - we
use the define KWIN_CONFIG which gets generated based on the compile
time arguments.

Reviewers: #kwin, #plasma

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3571
2017-04-15 10:03:34 +02:00
Martin Gräßlin fb69b791a1 Ensure that all Effects honour the grab roles correctly
Summary:
When windows get added some effects grab the window and want to be the
only one animating this window. For this the grab roles exists. An
effect being notified later on evaluates the grab state and does not
start the animation.

This process failed due to being dependent on the order the effects are
loaded. Window Added/Closed are signals emitted by EffectsHandler, thus
first come, first serve. The requested effect order does not play into
it.

Due to that it could happen that an Effect which should not animate,
started to animate as the grab was still there.

This change adds the possibility to be notified whenever the window data
changes. A new signal is added to EffectsHandler which is emitted
whenever the windowData changes. The interested effects connect to it
and cancel their (just started) animation for the window.

Adjusted effects are:
* ScaleIn
* Fade
* WobblyWindows

In case of WobblyWindows an additional logical error was fixed that the
animations were only run when an effect grabbed instead of the other way
around.

BUG: 336866
FIXED-IN: 5.8.4

Reviewers: #kwin, #plasma, broulik

Subscribers: plasma-devel, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3211
2016-11-07 11:45:09 +01:00
Martin Gräßlin 142aab2e24 Introduce an EffectsHandler::animationsSupported -> bool
Summary:
A new method to tell the effects system whether the compositor scene
is able to drive animations. E.g. on software emulation (llvmpipe) it's
better to not do any animations at all.

This information can be used by effects to adjust their behavior, e.g.
PresentWindows could skip transitions or effects can use it in their
supported check to completely disable themselves.

As a first step all scripted effects are considered to be unsupported
if animations are not supported. They inherit AnimationEffect and are
all about driving animations.

The information whether animations are supported comes from the Scene.
It's implemented in the following way:
 * XRender: animations are always supported
 * QPainter: animations are never supported
 * OpenGL: animations are supported, except for software emulation

In addition - for easier testing - there is a new env variable
KWIN_EFFECTS_FORCE_ANIMATIONS to overwrite the selection.

Reviewers: #kwin, #plasma

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2386
2016-08-15 17:38:33 +02:00
Alex Richardson cc29d0d296 Use SERVICE_TYPES parameter to kcoreaddons_desktop_to_json() 2015-12-09 23:42:45 +00:00
Thomas Lübking 8ba16371e7 stall wobbling while screen is transformed
transformed screens prevent hardware clipping
leading through filtering subquads
This requires to subquad in the painting pass
what is not supported for non rectangular
qauds ands presently aborts (in debug builds)
if any quad is transformed (as by eg. the wobbling)

REVIEW: 123733
BUG: 338972
2015-05-15 23:55:28 +02:00
l10n daemon script 262da1b7c9 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-04-07 13:20:00 +00:00
Elias Probst d00d3ea83c
Deprecate kservice_desktop_to_json(), use kcoreaddons_desktop_to_json() instead.
Get rid of deprecation warnings in effects KCM.

REVIEW: 121957
2015-01-16 22:52:26 +01:00
Volker Krause 5db2d5a556 Make constants const, saves a few symbols in the .data section. 2014-09-27 20:30:49 +02:00
Martin Gräßlin 6e1df6ba62 Do not register dbus service org.kde.kwin.Effects
Let's use org.kde.KWin, we have Object and interface to differentiate.
2014-05-15 10:55:29 +02: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
l10n daemon script 7553c411c2 SVN_SILENT made messages (.desktop file) 2014-05-03 08:32:58 +00:00
l10n daemon script 2f28437e24 SVN_SILENT made messages (.desktop file) 2014-05-02 08:51:14 +00:00
l10n daemon script 2838a9b606 SVN_SILENT made messages (.desktop file) 2014-04-29 10:12:33 +00:00
l10n daemon script 15aa971aab SVN_SILENT made messages (.desktop file) 2014-04-29 04:54:44 +00:00
Martin Gräßlin 7fcecc616c Drop "kwin4_effect_" prefix for BuiltIn Effects
This removes all the hacks to add kwin4_effect_ to the name of the Effect
and adjusts the desktop files of the effect configuration's parent
component.

Note: the scripted effects still start with kwin4_effect_ prefix.

REVIEW: 117367
2014-04-28 13:52:50 +02:00
Martin Gräßlin 4a1bc2ec96 [effects] Drop the .desktop files for the BuiltIn Effects
All KCMs and KWin core use the BuiltInEffects namespace to find and
interact with the effects. There is no information left in the desktop
file which are of usage. Thus they can be removed.
2014-04-28 13:52:43 +02:00
l10n daemon script e1f418f4d0 SVN_SILENT made messages (.desktop file) 2014-04-28 09:00:35 +00:00
l10n daemon script f44575ddbf SVN_SILENT made messages (.desktop file) 2014-04-28 05:16:52 +00:00
l10n daemon script 69c3289c18 SVN_SILENT made messages (.desktop file) 2014-04-27 21:02:43 +00:00
l10n daemon script e6db000065 SVN_SILENT made messages (.desktop file) 2014-04-04 05:29:27 +00:00
l10n daemon script eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
Martin Gräßlin 3bbc9436db [kwin] Add a virtual Effect::requestedEffectChainPosition
This method replaces the X-KDE-ORDERING property in the Effect's desktop
files. This change is a preparation step for integrating the new Effect
Loader which doesn't read the ordering information. Thus it needs to be
provided by the Effect itself so that the EffectsHandler can properly
insert it into the chain.

Also for the built-in Effects on the long run it doesn't make much sense
to install the desktop files. And binary plugin effects will migrate to
json metadata which also doesn't have the KService::Ptr. Thus overall it
simplifies to read this information directly from the Effect.
2014-03-28 14:04:54 +01:00
Martin Gräßlin 77fff7af6a [kwin] Port away from deprected KCoreConfigSkeleton::readConfig
Most is just switched to the ::read(). That should be enough for all the
Effects which have a KSharedConfig::Ptr underneath. If not we just need
to find a good place to put the reload.
2014-03-25 16:29:03 +01:00
Martin Gräßlin a2aab537d6 [kwin/effects] Use generated dbus interface to reconfigure effects
Instead of using EffectsHandler::sendReloadMessage we generate the dbus
interface in each plugin and call the reconfigure slot directly. That way
it's more type safe and we don't need to link kwineffects from the
configs.

REVIEW: 116875
2014-03-25 15:49:19 +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 c72e519d9c Remove KDE/ prefix in include directories
It's unneeded and deprecated since KF5.
2014-03-17 16:24:10 +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
l10n daemon script 22a5e1109f SVN_SILENT made messages (.desktop file) 2014-01-19 04:06:03 +00:00
Martin Gräßlin 4c08cf093c [kwin/effects] Add links to effect videos
For the following effects:
* cube
* cubeslide
* desktopgrid
* fade desktop
* magic lamp
* maximize
* minimize
* present windows
* slide
* wobbly windows
2013-12-13 09:58:31 +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 94f31606e6 CMake macros porting
kconfig_add_kcfg_files
qt5_add_dbus_adaptor
qt5_generate_dbus_interface
2013-11-27 16:11:14 +01:00
Martin Gräßlin 36d0a90859 KIntSpinBox -> QSpinBox in kwin/effects configs 2013-09-09 07:38:30 +02:00
Martin Gräßlin 987fd41d24 Port KWin/Effects from KDebug to QDebug
Still using KDE4Support as it's used in other areas.
2013-09-02 11:03:29 +02:00
Reza Shah 61f452723e Port KWin effects away from KAction and KShortcut to Qt5/KF5 classes.
REVIEW: 111898
2013-08-15 04:13:12 +09:00
Martin Gräßlin ed5d4048b6 foo.moc -> moc_foo.cpp in KWin effects config 2013-08-07 13:04:01 +02:00
Martin Gräßlin 2144f547d0 Port effect configs to new KCModule ctor 2013-07-24 09:58:43 +02:00
Martin Gräßlin 330d40f425 Fix no cast to/from ASCII intrduced issues
* "" needs to be wrapped in QStringLiteral
* QString::fromUtf8 needed for const char* and QByteArray
* QByteArray::constData() needed to get to the const char*
2013-07-24 09:58:33 +02:00
Martin Gräßlin 1d2c2d5982 Use Q_SLOTS and Q_SIGNALS instead of slots and signals
Fixes compilation with Qt5/KF5 setup.
2013-07-24 09:46:54 +02:00
l10n daemon script 5510335da9 SVN_SILENT made messages (.desktop file) 2013-06-24 03:57:22 +00:00
l10n daemon script a2e9957860 SVN_SILENT made messages (.desktop file) 2013-06-10 03:46:39 +00:00
Martin Gräßlin 60c42b7a34 s/KLocale/KLocalizedString/g
Many headers included KLocale to use i18n and co. But those methods are
defined in KLocalizedString and not in KLocale.

With KF5 klocale.h does no longer include KLocalizedString causing lots
of compile errors.
2013-03-07 13:59:15 +01:00
Script Kiddy 7d821f3814 SVN_SILENT made messages (.desktop file) 2013-01-26 09:04:17 +01:00
Script Kiddy 12f341712c SVN_SILENT made messages (.desktop file) 2012-12-24 09:05:36 +01:00
Script Kiddy d7316b9fcb SVN_SILENT made messages (.desktop file) 2012-12-23 08:01:50 +01:00
Script Kiddy ef0cae8dab SVN_SILENT made messages (.desktop file) 2012-12-18 15:28:22 +01:00
Thomas Lübking b0e0378c77 fix wobblynnoyance kcfg group
BUG: 311382
FIXED-IN: 4.10
2012-12-14 22:36:40 +01:00
Martin Gräßlin 876b427dfb Fix some C++11 narrowing conversation warnings
Thanks to Jurica Vukadin for providing the patch.

REVIEW: 106994
2012-11-26 10:27:02 +01:00