Commit Graph

109 Commits (2c169e4bca46289536eb96ed105e63d0b5714772)

Author SHA1 Message Date
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
Martin Gräßlin 6d2dfe06e7 Introduce dedicated OpenGL1 and OpenGL2 compositing types
The CompositingType enum turns into flags and two new values are
introduced: OpenGL1Compositing and OpenGL2Compositing.

Those new values are or-ed to OpenGLCompositing so that a simple check
for the flag OpenGLCompositing works in case of one of those two new
values. To make the generic check for OpenGL compositing easier a method
in EffectsHandler is introduced to just check for this.

The scenes now return either OpenGL1Compositing or OpenGL2Compositing
depending on which Scene implementation. None returns OpenGLCompositing.
2012-09-29 15:33:57 +02:00
Bernhard Friedreich 968d10c14a Use KConfigXT in Wobblywindows effect
REVIEW: 106389
2012-09-14 10:39:28 +02:00
Martin Gräßlin 23f2de009b Effects can provide support information through properties
The supportInformation is extended to also read the properties
on all effects. In addition each effect can be queried just for
itself through D-Bus, e.g.:
qdbus org.kde.kwin /KWin supportInformationForEffect kwin4_effect_blur

All effects are extended to provide their configured and read
settings through properties. In some cases also important
runtime information is exposed.

REVIEW: 105977
BUG: 305338
FIXED-IN: 4.9.1
2012-08-17 17:49:49 +02:00
Script Kiddy 953d088b6a SVN_SILENT made messages (.desktop file) 2012-06-12 17:07:51 +02:00
Script Kiddy 62211420c7 SVN_SILENT made messages (.desktop file) 2012-05-28 11:08:19 +02:00
Martin Gräßlin 812c310dcf Fix unused variable warnings
SVN_SILENT
2012-05-27 16:35:04 +02:00
Martin Gräßlin d14cf2da92 Show detailed information why an effect cannot be loaded
Effects can specify their minimum requirements in their
desktop file:
* OpenGL
* OpenGL 2 (GLSL required)
* Shaders (either ARB or OpenGL 2)

The configuration module uses this information in combination
with which backend KWin is currently using. So if e.g. OpenGL
is used and an effect requires OpenGL 2 a detailed error
message can be showed that OpenGL 2 is required.

BUG: 209213
FIXED-IN: 4.9.0
REVIEW: 104847
2012-05-15 18:02:57 +02:00
Thomas Lübking 766bc27940 tag window being moved before dropping out of QuickTile/Max and omit wobble if window being moved during maximization change
BUG: 222102
REVIEW: 104841
FIXED-IN: 4.9
2012-05-03 18:54:30 +02:00
Martin Gräßlin 2007a7eab8 Use namespaced parameters in signals
Required to get scripting bindings working.
2012-03-12 21:37:40 +01:00