Commit graph

276 commits

Author SHA1 Message Date
Martin Gräßlin
16568804be Demands Attention handling in Workspace operates on AbstractClient
Affects:
* list attention_chain
* clientAttentionChanged
* clientDemandsAttentionChanged
2015-05-08 12:43:47 +02:00
Martin Gräßlin
9457b362c1 Drop not needed dynamic cast in WorkspaceWrapper::setActiveClient 2015-05-08 12:43:46 +02:00
Martin Gräßlin
8cfe0a9316 Workspace::clientActivated signal changed to AbstractClient
connections changed to new connect syntax to ensure they are correct.
2015-05-08 12:43:45 +02:00
Martin Gräßlin
3ad117ac28 Workspace::activeClient returns an AbstractClient
Still a few casts in some areas as setting activeClient still takes
a Client.
2015-05-08 12:43:45 +02:00
Martin Gräßlin
4b41c33268 Workspace::movingClient changed to AbstractClient
In events.cpp it's casted to Client as it's X11 specific.
In InputRedirections it's kind of broken, but window movement is
anyway broken.
2015-05-08 12:43:45 +02:00
Martin Gräßlin
4eb9a98f1a [scripting] actionsForUserActionMenu operates on AbstractClient 2015-05-08 12:43:45 +02:00
Thomas Lübking
83a42c55be ScriptedEffect: gauss curve anim and ended signal
latter allows to chain actions in scripted effects
and former prevents the need to do that for a continuous
in/out animation
2015-04-07 23:59:18 +02:00
Thomas Lübking
060f3e9403 Remove AnimationData wrapper around metadata.
Instead allow to set metadata directly in animation
objects

REVIEW: 122679
2015-04-07 23:59:18 +02:00
Mika Allan Rauhala
2217c1038f Add Quick Tile Window to the Top and Bottom shortcuts
This adds "Quick Tile Window to the Top" and "Quick Title Window to the Bottom" shortcuts. These are
useful for those using displays that are in portrait orientation.

CCBUG: 310005
REVIEW: 123153
2015-03-31 11:10:13 +02:00
Christophe Giboudeaux
bea55dc614 -Wmissing-include-dirs 2015-03-22 22:36:26 +01:00
l10n daemon script
bf7bf73464 SVN_SILENT made messages (.desktop file) 2015-01-15 09:02:26 +00:00
l10n daemon script
d173ff7412 SVN_SILENT made messages (.desktop file) 2015-01-13 12:47:17 +00:00
Martin Gräßlin
66df3eefdf Cleanup: reduce usage of QDesktopWidget 2014-11-27 09:32:43 +01:00
Martin Gräßlin
b7a8bb4f52 Drop build option KWIN_BUILD_SCREENEDGES
The build option got introduced for Plasma Active back in a time
when we did not properly aim for convergence. In a Plasma 5 world
we want to have only one shell and one window manager which adjust
itself. This means we don't want a differently compiled kwin for
plasma active, but the same one. Thus the build option doesn't
make much sense any more. A KWin for touch interface needs to support
screenedges for the case that mouse is plugged in.

CCBUG: 340960
REVIEW: 121200
2014-11-24 10:48:49 +01:00
Martin Gräßlin
482f89b91f Fix build without KF5Activities
BUG: 340961
FIXED-IN: 5.2.0
REVIEW: 121202
2014-11-24 10:47:08 +01:00
l10n daemon script
45b1af3165 SVN_SILENT made messages (.desktop file) 2014-10-29 08:42:18 +00:00
l10n daemon script
91ff859d5f SVN_SILENT made messages (.desktop file) 2014-09-27 09:33:56 +00:00
l10n daemon script
fd8006c546 SVN_SILENT made messages (.desktop file) 2014-09-24 08:30:00 +00:00
Martin Gräßlin
c00c67bf29 [scripting] Drop qmlRegisterType for QQuickWindow
Not needed as one can just do:
import QtQuick.Window;

This fixes a build problem with Qt 5.4.

BUG: 338277
2014-09-03 09:47:21 +02:00
l10n daemon script
28c7f3c47d SVN_SILENT made messages (.desktop file) 2014-06-29 08:41:34 +00:00
Martin Gräßlin
8aa8617ed4 Drop our custom KLocalizedTranslator
It's upstreamed to ki18n framework.
2014-06-18 15:02:58 +02:00
Martin Gräßlin
0c4aaaf4ad [scripting] Support loading translations for UI loaded configs
Scripts and scripted effects can provide a ui file which gets loaded at
runtime. Obviously such a ui file is not translated. This introduces
quite a hack to load the translated strings.

In the metadata.desktop file the scripted component can provide a key
X-KWin-Config-TranslationDomain. The genericscriptedconfig tries to
locate the metadata.desktop file and reads this entry. If it is present
we extract all string properties of the loaded UI and pass them through
ki18nd.

REVIEW: 118585
2014-06-10 15:49:19 +02:00
l10n daemon script
e73f6b2278 SVN_SILENT made messages (.desktop file) 2014-06-10 10:37:36 +00:00
Martin Gräßlin
645e1cf775 [scripting] Reparent the created QML object
According to the documentation the ownership of a QObject created by
QQmlComponent::create is transferred to the caller.

This fixes a crash on KWin tear down.

REVIEW: 118345
2014-05-30 15:47:24 +02:00
Martin Gräßlin
c6da593dc9 Do not register dbus service org.kde.kwin.Scripting
Just use org.kde.KWin - there's object and interface to differentiate.

REVIEW: 118139
2014-05-15 10:55:29 +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
21d2905ffb Adjust genericscriptedconfig to new ki18n
Might need improvement to have the genericscripted in an own directory.
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
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
David Faure
20bc3ff68b Include ksharedconfig.h (since it will be removed from kpluginfactory.h) 2014-03-29 09:32:06 +01: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
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
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
bc0a9cb53a [kwin] Use std::find_if and lambda functions for Workspace::findClient
Instead of passing the macro based Predicate to findClient it now
expects a function which can be passed to std::find_if.

Existing code like:
xcb_window_t window; // our test window
Client *c = findClient(WindowMatchPredicated(window));

becomes:
Client *c = findClient([window](const Client *c) {
    return c->window() == window;
});

The advantage is that it is way more flexible and has the logic what
to check for directly with the code and not hidden in the macro
definition.

In addition there is a simplified overload for the very common case of
matching a window id against one of Client's windows. This overloaded
method takes a Predicate and the window id.

Above example becomes:
Client *c = findClient(Predicate::WindowMatch, w);

Existing code is migrated to use the simplified method taking
MatchPredicate and window id. The very few cases where a more complex
condition is tested the lambda function is used. As these are very
local tests only used in one function it's not worthwhile to add further
overloads to the findClient method in Workspace.

With this change all the Predicate macro definitions are removed from
utils.h as they are now completely unused.

REVIEW: 116916
2014-03-25 15:17:11 +01:00
Martin Gräßlin
d1d3401b9f Register KWin's global shortcuts with the new shortcut system
All the KWin core shortcuts get also registered inside the new global
shortcut system so that they are still triggered when running KWin on
Wayland.
2014-03-19 14:14:56 +01:00
Martin Gräßlin
8699fe5e5a [kwin/genericscriptedkcm] Generate dbus interface from XML description 2014-03-19 08:10:45 +01:00
Martin Gräßlin
0d07738ca9 [kwin] Fix genericscripted config
* Use metadata as json
* set Q_PLUGIN_METADATA and Q_INTERFACES
* port away from kde4_add_plugin

Only tested with effects, scripts might need further adjustements.

REVIEW: 116862
2014-03-19 08:00:28 +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
869c087e21 [kwin] Use QQmlEngine from Scripting in TabBox
Instead of having it's own QQmlEngine TabBox just uses the newly
exposed engine from Scripting and creates a new context for it's
own usage.

REVIEW: 116565
2014-03-10 09:09:01 +01:00
Martin Gräßlin
adf485c261 [kwin] Share QQmlEngine between all declarative KWin Scripts
Instead of having each declarative script create it's own qml engine
there is one hold by the Scripting singleton. The engine's root context
gets populated in Scripting and each script just gets a new child
context. Thus also the WorkspaceWrapper instance is shared between the
declarative scripts.
2014-03-10 09:08:38 +01:00
Martin Gräßlin
3f0ff9b8d5 Migrate effects from displayWidth()/displayHeight() to virtualScreenSize()/virtualScreenGeometry()
Rational behind this change is that displayWidth and displayHeight are
X specific API calls in kwinglobals. For the future it's easier to only
rely on functionality which goes through the EffectsHandler API which
allows easier adjustments in KWin core.

displayWidth() and displayHeight() are only used to get the size or the
complete rect of all screens. This is also provided by:

effects->virtualScreenGeometry() or
effects->virtualScreenSize()

REVIEW: 116021
2014-03-07 08:01:44 +01:00