Commit Graph

12043 Commits (651ea9f3746f0d7b992947feef656ff64e2dae4c)

Author SHA1 Message Date
Antonis Tsiapaliokas dac370fc61 Move effectStatus and syncConfig from EffectView class to EffectModel 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas f9706e0734 Make our dbus call async 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 34cccc91ed Make our model able to be reloaded.
Also fix the coding style and make krazy happy.
2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas f44691b61c Move findImage method from EffectView to EffectModel 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 2f30411106 Make our QAbstractListModel smarter, give better names to
the enumenators.
Rename struct Effect to EffectData
2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas abaf03c1d0 We should have only 1 proxy, not 2 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 8081e2eb53 Add buttons to the effect config dialog 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas fc662d175d Add method findImage
Qt QuickControls require an abosolute path to the image
2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 2431da8222 Buttons are enable only when they have something to do 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 837c44434d Load the configuration UI for the Effects 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 51549d3ec9 Make our effects able to be enable and disable 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 32ee949a8d Add an about button for the author and the license of the effect 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas 738f730a62 Load the real effects from the system 2014-04-03 07:23:13 +02:00
Antonis Tsiapaliokas e816a0823c Replace -std=c++11 with -std=c++0x
c++0x is being supported for gcc < 4.6
2014-04-03 07:23:12 +02:00
Antonis Tsiapaliokas 4305fb79b8 Add support for c++11 and fix building issues 2014-04-03 07:23:12 +02:00
Antonis Tsiapaliokas 52326ac892 Fix license 2014-04-03 07:23:12 +02:00
Antonis Tsiapaliokas 1d6dee92fc Initial commit 2014-04-03 07:23:12 +02:00
l10n daemon script eef56c98b2 SVN_SILENT made messages (.desktop file) 2014-04-03 05:10:09 +00:00
David Faure 08112b9a93 Remove use of obsolete timestamp() method 2014-04-01 15:15:47 +02:00
Àlex Fiestas 2ecc67dcdc Remove CMake no longer needed for spltited repos.
Mostly remove
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
2014-04-01 14:00:14 +02:00
Martin Gräßlin b15a97bb88 Properly remove KWIN_BUILD_OXYGEN
Left over from splitting, caused Aurorae to be the default deco.
2014-03-31 13:20:39 +02:00
Martin Gräßlin c64ad6b640 [kwin] KWinrules needs the X11Cursor
Fixes crash when trying to detect the window properties.
2014-03-29 10:49:14 +01:00
David Faure 137906a547 doesn't need klibrary 2014-03-29 10:00:42 +01:00
David Faure 924b8b5a9e Fix compilation on OpenSuSE 13.1 which puts xkbcommon.h in /usr/include/pkg/libxkbcommon/xkbcommon/ 2014-03-29 09:32:06 +01:00
David Faure 20bc3ff68b Include ksharedconfig.h (since it will be removed from kpluginfactory.h) 2014-03-29 09:32:06 +01:00
Jonathan Riddell 7f345a386b update versions to 4.95.0 for Plasma 2014.6 Alpha 1 2014-03-29 00:45:23 +00:00
Alex Merry 4d88fcdff6 [kwin] Adapt to KPluginFactory change
KPluginFactory's constructor no longer takes arguments, since plugin
root objects are not passed any arguments.
2014-03-28 19:50:46 +00:00
Martin Gräßlin b0e892e359 [kwin] Add a new EffectLoader
The EffectLoader is a subclass of AbstractEffectLoader delegating all
methods to instances of:
* BuiltInEffectLoader
* ScriptedEffectLoader
* PluginEffectLoader

It's used by the EffectsHandlerImpl and replaces the complete Effect
loading mechanism we so far found in it. This also means that KLibrary
is no longer needed to load the Effects as the PluginEffectLoader uses
the KPluginTrader, which removes lots of deprecated functionality.

REVIEW: 117054
2014-03-28 14:04:55 +01:00
Martin Gräßlin 6622c97601 [kwin] Add a PluginEffectLoader
This is a specialized subclass of AbstractEffectLoader to load binary
effect plugins. It used the KPluginTrader to find all candidates to load.
The loader is able to detect incorrect ABI versions through the
pluginVersion() and uses the methods exposed by the new
KWin::EffectPluginFactory to check whether the Effect is supported and
should be enabled by default.

The unit test for this loader comes with two plugins: one is able to be
loaded and provides a supported and enabledByDefault method which can be
tweaked during the test to get all the conditions we want to test for.

The second plugin uses an incorrect plugin version and thus cannot get
loaded.
2014-03-28 14:04:54 +01:00
Martin Gräßlin e68d5c6315 [kwin] Add a KPluginFactory subclass for loading binary Effects
A KWin::EffectPluginFactory is introduced which provides a specialized
create method and methods for the supported and enabledByDefault checks.

A set of KWIN_EFFECT_FACTORY macros are added which create a subclass
of this EffectPluginFactory following the approach from the
KPluginFactory macros. The macros only support json metadata thus the
QPluginTrader needs to be used.

The KWIN_EFFECT macros are removed as they are no longer needed.

KWin Core's loader is not yet adjusted to this change. This is a
preparation step for introducing a PluginEffectLoader.
2014-03-28 14:04:54 +01: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 42ff5e0c08 [kwin] Move finding of scripted effect source file to ScriptedEffect
New ScriptedEffect::create(KService::Ptr). This is a preparation for
adding the ordering directly to the Effect.
2014-03-28 14:04:54 +01:00
Martin Gräßlin ba12fe3cc0 [kwin] Add a ScriptedEffectLoader
This implementation of the AbstractEffectLoader is able to to load the
scripted KWin Effects. It uses KServiceTypeTrader to find all the
candidates to load.
2014-03-28 14:04:54 +01:00
Martin Gräßlin 0fd9a1eeee [kwin] Introduce a new Effect Loading mechanism
Effect loading gets split by the kind of effects KWin supports:
* Built-In Effects
* Scripted Effects
* Binary Plugin Effects

For this a new AbstractEffectLoader is added which will have several
sub-classes:
* BuiltInEffectLoader
* ScriptedEffectLoader
* PluginEffectLoader
* EffectLoader

The EffectLoader will be what the EffectsHandlerImpl is using and it just
delegates to the three other types of loaders. Thus the handler doesn't
need to care about the different kinds of effects. The loading is
supposed to be completely async and the EffectLoader emits a signal
whenever an Effect got loaded. The EffectsHandlerImpl is supposed to
connect to this signal and insert it into its own Effect management.
Unloading is not performed by the loader, but by the EffectsHandler.

There is one important change which needs to be implemented: the ordering
cannot be provided by the loader and thus needs to be added to the
Effects directly.

So far only the BuiltInEffectsLoader is implemented. It's not yet
integrated into the EffectsHandlerImpl, but a unit test is added which
tries to perform the various operations provided by the loader and the
BuiltInEffects. The test should cover all cases except the Check Default
functionality which is only used by Blur and Contrast effects. This
cannot be mocked yet as the GLPlatform doesn't allow mocking yet.
2014-03-28 14:04:54 +01:00
Martin Gräßlin 40bb6faa30 [kwin] Add enabledByDefault boolean value to the BuiltInEffects
For each effect the value from the desktop file is added. This will
allow to query all effects which need to be loaded without looking for
the service files.
2014-03-28 14:04:54 +01:00
Martin Gräßlin 659b760355 [kwin] Rename BuiltInEffects::enabledByDefault to checkEnabledByDefault
The functionality is to check whether the effect should be enabled by
default. It's not about whether the effect is enabled by default. This
is also needed as it's currently still taken from the plugin data.
2014-03-28 14:04:54 +01:00
Martin Gräßlin 82731f231e [kwin] Define an enum for all the built in effects
For each effect there is an enum value. The internal mapping of effect to
create, supported and checkDefault is switched to the enum value, though
the methods for the name based variants are still available.
2014-03-28 14:04:54 +01:00
Bhushan Shah 27deaa2d46 Try using OpenGL2 compositor on the Intel i915 and newer chipsets.
If it causes problem it can be still reverted

REVIEW: 117053
2014-03-28 22:25:10 +05:30
Alex Richardson 3d9abbe6ff Don't include xkbcommon/xkbcommon.h in input.h, forward-declare instead
Some systems (e.g. openSuSE) don't install the xkbcommon header into
/usr/include/xkbcommon/xkbcommon.h (which is always in the include path),
but instead into a subdirectory, which is in the openSuSE case
/usr/include/pkg/libxkbcommon/xkbcommon/xkbcommon.h. This means that e.g.
kcm_kwinrules will not compile there since it includes input.h

REVIEW: 117069
2014-03-28 09:42:02 +01:00
Martin Gräßlin d0fb6b22ba [kwin] Use new connect syntax in useractions.cpp
Although there are many local slots in UserActionsMenu those are not
turned into lambdas as they are rather long.

REVIEW: 117117
2014-03-27 18:11:19 +01:00
Martin Gräßlin 48f03a46a2 [kwin] Use nullptr in GetAddrInfo::resolve
It was a FIXME C++11.
2014-03-27 15:47:15 +01:00
Martin Gräßlin cdd9c5bcf5 [kwin/aurorae] Have the QMutex in the Factory and not in each Client
This seems to fix the crash which could happen when closing a window. At
least the kwindowsystem unit tests no longer crash KWin (it was very
reliable before).

BUG: 332091
2014-03-27 14:19:04 +01:00
Martin Gräßlin 086bc69ec5 [kwin] Use new connect syntax in EffectsHandlerImpl
All the connections in EffectsHandlerImpl are replaced by the new syntax.
Where it makes sense the wrapping slot method is added as a lambda and
the slot method is removed.

REVIEW: 117076
2014-03-27 13:13:05 +01:00
Àlex Fiestas d103db4b29 Use ecm_configure_package_config_file instead of configure_file
Works better on all kind of systems (in concrete it fixes things for Debian
users)
2014-03-27 12:38:36 +01:00
Martin Gräßlin 4c2da43553 [KWin] Fix reconfigure from PresentWindows Config plugin
Didn't have kwin4_effect_ prefix.
2014-03-27 12:08:10 +01:00
Martin Gräßlin 635d044869 [kwin] Reparse shared configuration before reconfiguring an Effect
When the Effect has to be reconfigured the configuration most likely
changed, thus we should reload it. Of course it would be possible to also
do this in each Effect::reconfigureEffect, but this would mean that the
configuration would be reloaded during startup, which we do not want.
2014-03-27 12:04:25 +01:00
Àlex Fiestas bef2764c8f Put licence files on each repo, removing from root. 2014-03-26 19:01:09 +01:00
Àlex Fiestas 9576c55fe6 Use CMAKE_SOURCE_DIR instead of KDEBASE_WORKSPACE_SOURCE_DIR
Allows us to remove project() from the root CMakeLists.txt
2014-03-26 19:01:08 +01:00
Àlex Fiestas 92c9c514b8 Adding path to CMAKE_MODULE_PATH is ok all the time
We don't need to protect the build system against adding extra
directories in the CMAKE_MODULE_PATH This also prepares kde-workspace
to be build with a simple CMakeLists.txt in the root directory.
2014-03-26 19:01:08 +01:00
Martin Gräßlin 4ab55976d8 [kwin] Move the doc for kcmkwin to kwin
* desktop (virtual desktops)
* kwincompositing
* kwindecoration
* kwinscreenedges
* kwintabbox
* windowspecific
* windowbehaviour

CCMAIL: kde-doc-english@kde.org
2014-03-26 14:51:18 +01:00