Hi Trinity developers,
finally I can announce the availability of a patch [1] to build KWin
standalone. That is without building other parts of kde-workspace. The patch
is on top of KDE/4.10 branch [2] as of Friday and available in git branch
"kwin/standalone" of my kde-workspace clone [3].
I hope this patch can help you to provide a tailored version of KWin. Most of
the functionality which is required for this is already part of KWin master
and also used in some KDE projects. E.g. for Plasma Active we use an adjusted
KWin version without window decorations, without KCMs, with a different binary
name and different configuration files. To make it easier to build KWin for
new developers we introduced a build option to disable the Oxygen window
decoration which required to build most parts of kde-workspace. All available
build options are documented in [4].
*Build Options*
For the usage in your project I would suggest the following build options:
* adjust the "KWIN_NAME" variable in CMakeLists.txt
* disable KWIN_BUILD_OXYGEN
* disable KWIN_BUILD_KCMS
* disable KWIN_BUILD_KAPPMENU
* disable KWIN_BUILD_ACTIVITIES
The steps on how to build KWin are probably well known given that it is a
cmake project. If not there is a beginners guide available in [5].
The patch does not reduce the dependency on kdelibs and kde-runtime. We still
have a dependency on kdelibs and that cannot change in the lifetime of KWin on
Qt 4 due to part of KWin being implemented in kdelibs.
*Styling*
Also KWin has a pretty standard Plasma look'n'feel. But this can be easily
changed:
* window decorations can be written in QML since 4.10 - with disabled Oxygen
the default decoration is in fact on QML. Documentation for this is still
missing, but is on my TODO list ;-)
* Alt+Tab window switchers can be written in QML. Documentation for this is
available in [6] and this feature is e.g. used by Plasma Active to have a
customized switcher
* QML scripts can be loaded - e.g. our "Desktop Change OSD" is written in QML.
It would be easy to replace it with one that does not use Plasma Components.
Documentation is available in [7] for the general JavaScript API.
*What are the next steps?*
Development focus is currently on porting KWin to Qt5. Given the strong usage
of XLib this is more work than for most projects. But I hope that this will
soon be finished. With Qt5 and KDE Frameworks 5 the dependencies will go down
to what is really needed and quite some for KWin important functionality from
kdelibs has been upstreamed into Qt.
Other plans are to use KConfigXT for the complete configuration of KWin. This
is already used (since 4.10) for KWin effects and would allow to easily
integrate our configuration interfaces in your available configuration module.
With KConfigXT the configuration modules basically consist of .ui files and an
xml description of the config values. (Note: the KCMs belonging to KWin do not
support a changed binary name.)
Apart from that I want to have everything which is UI to be done in QML.
*Final Remarks*
This patch is a personal service provided by me and is not officially
supported by KDE. I will not update the patch on a regular basis, though I
intend to update it for each release cycle once a new version has been
branched. This also means that I cannot guarantee that everything works
correctly. If you hit a bug related to this patch let me know, but please
don't open a report on
bugs.kde.org.
I hope this patch is helpful for you. If you need improvements you are of
course more than welcome to contribute to KWin :-)
A Merry Christmas to you and a happy and successful new year 2013.
Kind Regards
Martin Gräßlin
KWin Maintainer
[1]
http://quickgit.kde.org/?p=clones%2Fkde-workspace%2Fgraesslin%2Fkde-
workspace.git&a=commitdiff&h=2f23192fe2658b9ecde005db40b2ec366b3e18d4&hp=60844a5744b04483e86bff299713e1e56df52a4a
[2]
http://quickgit.kde.org/?p=kde-
workspace.git&a=shortlog&h=60844a5744b04483e86bff299713e1e56df52a4a
[3]
http://quickgit.kde.org/?p=clones%2Fkde-workspace%2Fgraesslin%2Fkde-
workspace.git
[4]
http://techbase.kde.org/Projects/KWin/Build_Options
[5]
http://community.kde.org/KWin/Building
[6]
http://techbase.kde.org/Development/Tutorials/KWin/WindowSwitcher
[7]
http://techbase.kde.org/Development/Tutorials/KWin/Scripting