Commit graph

27 commits

Author SHA1 Message Date
David Edmundson
f45ad69c78 Port away from overloaded KCModule signal
Test Plan: Compiles

Reviewers: #kwin, apol, zzag

Reviewed By: #kwin, apol, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25666
2019-12-02 09:03:14 +00:00
Vlad Zagorodniy
253ff428a7 [effects] Port to new connect syntax
Summary:
The new connect syntax has several advantages over the old syntax:

(a) Connecting with the new syntax is faster;
(b) It is compile time checked.

There are still a few places where the old connect syntax is used, e.g.
connecting to QML buttons in the Desktop Grid effect.

Test Plan:
Have been testing this patch for ~2 weeks, haven't noticed any
regressions.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, broulik, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18368
2019-01-26 01:22:06 +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
b8e433d0a9 [effects] Properly set the componentDisplayName on the KActionCollection
Without the componentDisplayName the shortcut dialog takes the name of
the application e.g. Systemsettings or "KDE Control Module", but we want
it to be KWin.

REVIEW: 124706
2015-08-12 09:40:55 +02:00
Martin Gräßlin
634de251c3 [effects/presentwindows] Trigger using LaunchA button
On MacBooks the "Exposé" button is on XF86LaunchA. Let's use it
for activating Present Windows (ALL) as an alternative shortcut.
For non-macbook users this doesn't hurt, for MacBook users it's a
nice touch to have the key working as indicated by the pictogram.

Yes, it's realy Key_LaunchC:
"On X11 this key is mapped to XF86XK_LaunchA key for legacy reasons."

REVIEW: 118721
2014-06-20 09:26:28 +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
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
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
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
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
ba7d50fdc5 Disable global shortcut handling in all effects
KAction and KShortcut needs porting, so disabled for now.
2013-07-24 09:58:44 +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
Dirk Sarpe
31fa04d653 Use KConfigXT in PresentWindows Effect
REVIEW: 106407
2012-09-14 10:39:28 +02:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Thomas Lübking
267ce1942b option out close button, remove redundant tabbox config item
svn path=/trunk/KDE/kdebase/workspace/; revision=1195636
2010-11-11 17:04:42 +00:00
Martin Gräßlin
235c01e6a7 Remove the duration spin box in the present windows config as this setting is unused in present windows.
BUG: 220281

svn path=/trunk/KDE/kdebase/workspace/; revision=1066692
2009-12-27 18:51:57 +00:00
Will Stephenson
653a856146 Fix spelling mistake.
svn path=/trunk/KDE/kdebase/workspace/; revision=1025696
2009-09-19 12:57:06 +00:00
Laurent Montel
3ce5dd0ffc Fix includes
svn path=/trunk/KDE/kdebase/workspace/; revision=1018077
2009-09-01 07:05:48 +00:00
Andrius Štikonas
f3dad43a18 Use KIntSpinBox instead of QSpinBox for better integration with KDE. As a bonus this allows to use plural suffix in spinboxes since KDE 4.3 if necessary.
svn path=/trunk/KDE/kdebase/workspace/; revision=989742
2009-06-30 20:09:04 +00:00
Martin Gräßlin
ae0bac5c42 New mode for present windows effect: selecting all windows of same class as active window.
svn path=/trunk/KDE/kdebase/workspace/; revision=989722
2009-06-30 19:11:02 +00:00
Martin Gräßlin
a26c5b1225 Configurable mouse actions in present windows for clicking a window and desktop.
It's possible to activate a window, exit without activating, bring window to current desktop, send window on all desktops, mimize the window and close the window.
Clicking desktop allows to activate selected window, exit without activating, show the desktop (minimize all apps) and of course do nothing.
FEATURE: 163116

svn path=/trunk/KDE/kdebase/workspace/; revision=988788
2009-06-28 17:17:29 +00:00
Michael Jansen
366488f20c Commit 921749 changed the component name for kwin effects configuration kcms
from kwin to kcm_kwin4_effect_xyz . That broke global shortcuts configuration.

CCMAIL: kwin@kde.org
CCMAIL: lmurray@undefinedfire.com

svn path=/trunk/KDE/kdebase/workspace/; revision=924534
2009-02-11 00:34:09 +00:00
Lucas Murray
846496d2c1 Cleaned up the effects/ directory by moving each individual effect into
its own directory, cleaned up the effect config macros and renamed
"MakeTransparent" to "Translucency" so that it matches its visible name.

svn path=/trunk/KDE/kdebase/workspace/; revision=921749
2009-02-05 15:35:38 +00:00
Renamed from effects/presentwindows_config.cpp (Browse further)