Commit Graph

351 Commits (e1f418f4d0c7c2283449e70a807a9fa1000b6a27)

Author SHA1 Message Date
Alex Merry 4804964b3d Install kwin.notifyrc to the correct location 2014-04-26 22:27:35 +01:00
Alex Merry e5a1f9b309 Remove CONFIG argument from find_package(KF5)
This is no longer wanted, since ECM has a FindKF5 module.
2014-04-26 11:03:30 +01:00
Michael Palimaka 801873b216 Fix configure failure when optional packages are missing.
When find_package(KF5 CONFIG REQUIRED) is called, any subsequent
find_package(KF5) calls will be marked as required too. So,
find optional frameworks separately to avoid configure failure
if they are missing.

Also add information about the status of the optional packages
to the feature summary.

REVIEW: 117728
2014-04-24 22:34:26 +10:00
Michael Palimaka 1bca6c3dfa Disable testing if QtTest is not found.
REVIEW: 117393
2014-04-18 16:43:24 +10:00
Martin Gräßlin 8a2df7ac4d Add a build option to compile with gcov support
New build option KWIN_BUILD_COVERAGE which adds
"-fprofile-arcs -ftest-coverage" to CMAKE_CXX_FLAGS and "-lgcov" to
CMAKE_EXE_LINKER_FLAGS.

REVIEW: 117369
2014-04-07 08:01:25 +02:00
Martin Gräßlin 28b4cfaa9a Drop build dependency on kde4support for the build system
* Ported last qt4_wrap thingy to qt5_wrap thingy
* Include KF5Init (needed for kdeinit_executable
* Optionally include KF5DocTools and bind the docs subdirectory to it
* Include GenerateExportHeaders
2014-04-03 10:15:57 +02:00
Martin Gräßlin ceecc5be27 [kwincompositing] Integrate the new kcmkwin subdirectory into build tree
* root CMakeLists.txt finds Declarative and Qt5Multimedia (Runtime)
* kwincompositing CMakeLists.txt is cleaned up to not be a project
2014-04-03 07:23:17 +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
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
Jonathan Riddell 7f345a386b update versions to 4.95.0 for Plasma 2014.6 Alpha 1 2014-03-29 00:45:23 +00: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
À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
À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
Martin Gräßlin 56c35d0600 [kwin] Copy required FindModules to kwin
Required for standalone build, removes the hack to include the modules
from kde-workspace.
2014-03-26 14:37:36 +01:00
Martin Gräßlin e3179841f3 [kwin] Create an own library for kwinxrenderutils
XRenderUtils are split out of kwineffects and are an own library just
like kwinglutils is an own library.

The library gets always build and is linked in KWin core unconditionally
(as it's used in outline) and conditionally in kwineffects (PaintClipper)
and the built in effects depending on XRender build option.
2014-03-26 14:02:16 +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
Àlex Fiestas ac2a87132a Switch KWIN_BUILD_KAPPMENU OFF by default
appmenu will not be part of the first Plasma Next version since it
needs a lot of work (make it async, port to GMenu etc).

So for the time being let's disable the feature by default.

REVIEWED-By: Martin Gräßlin <mgraesslin@kde.org>
2014-03-24 16:51:52 +01:00
Àlex Fiestas b33425baaa Move Oxygen kwin decoration to the oxygen folder 2014-03-24 16:43:11 +01:00
Àlex Fiestas f8134f9393 Add a copy of org.freedesktop.ScreenSaver.xml for KWin
Since it is a standard (fd.o) it makes sense to copy the interface
rather than creating a dependency with plasma-workspace which it
actually doesn't since KWin will work with any screensaver using the
freedesktop specification.
2014-03-24 16:30:22 +01:00
Àlex Fiestas 0e9f6888e0 Stop suspending startup from KWin
This commit basically makes KWin stop using suspend-resumeStartup
methods from KSMServer. The idea is to launch things on parallel and
this is doing exactly the contrary.

Reviewed-by: Martin Gräßlin <mgraesslin@kde.org>
2014-03-24 16:01:48 +01:00
Àlex Fiestas 740616fac3 Add conditional to avoid calling summary_view twice 2014-03-21 17:47:50 +01:00
Aleix Pol a9fae41ac0 Install a config file with KWin's dbus interfaces 2014-03-21 16:42:48 +01:00
Aleix Pol 8b8f327458 Explicit OpenGL version checking is not needed anymore 2014-03-21 12:02:58 +01:00
Aleix Pol 7ae2fe422c Move find_package() calls into the respective directories
All should be done except for KF5 and Qt.
I tried to go through all projects and see whether it depended on the
different modules. I would appreciate it very much if the different
maintainers could take a look and see if everything is correct.

CCMAIL: plasma-devel@kde.org
2014-03-20 23:40:40 +01:00
Aleix Pol 7c1538957d Remove the need of having a global HAVE_X11 variable
Use the standard X11_FOUND instead
Also properly set the HAVE_X11 value, since it's checked with #if HAVE_X11
instead of #ifdef.
2014-03-20 18:33:29 +01:00
Martin Gräßlin 5428a15266 [kwin] Fix build if Wayland is found, but xkbcommon is missing
It enabled the Wayland build, but it should be disabled if xkbcommon
is missing.

Thanks to Project Neon for finding this issue.
2014-03-20 12:54:24 +01:00
Martin Gräßlin 24b23dfc01 Beginning of global shortcut handling inside KWin
A new GlobalShortcutsManager is introduced which is responsible for
holding the registered shortcuts and triggering the matching action.

The InputRedirection checks with the GlobalShortcutManager whether a key
press event triggers a global shortcut and stops processing the event in
that case.

At the moment the GlobalShortcutsManager only supports the very basics
for KWin internal usage. External applications can not yet make usage of
the global shortcut system inside KWin.
2014-03-19 14:14:56 +01:00
Martin Gräßlin 82fd9020e4 [kwin] Improve setting HAVE_WAYLAND_EGL
On the CI system that seemed to have been true although
Wayland Client lib was not found.
2014-03-19 11:02:39 +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 c8b4f1e9e2 [kwin] Add hack for finding the ksmserver and screenlocker DBus interface
Uses find_package in standalone build - that's for the future and in
combined build just sets the same variable to hardcoded path in the repo.
2014-03-19 07:56:17 +01:00
Martin Gräßlin 570ce05974 [kwin] Adjust CMakeLists.txt to allow standalone built of KWin
Preparation step before splitting:
* adds project(KWIN)
* lists all KWin dependencies

KWin can be built standalone if cmake is run with:
-DKWIN_BUILD_OXYGEN=OFF
-DKWIN_BUILD_KAPPMENU=OFF

Oxygen because it needs liboxygen - for standalone clients/oxygen needs
to be moved out of KWin.

KAppmenu because it includes the DBus xml file.

REVIEW: 116872
2014-03-18 17:42:19 +01:00
Aurélien Gâteau 90498594c2 kwin: add missing library. Fixes build 2014-03-18 16:39:34 +01:00
Aleix Pol 6d3acfc71e Properly point to ksmserver from kwin 2014-03-18 14:22:57 +01:00
Aleix Pol 0283d67998 Move the repositories into plasma-* subdirectories before splitting
Creates two subdirectories: plasma-workspace and plasma-desktop
plasma-workspace contains the modules that should be re-usable between
different form factors. plasma-desktop contains the modules that
are specific to the Desktop.
See http://community.kde.org/Plasma/Tokamak7/split_proposal

Reviewed by Àlex Fiestas
2014-03-18 13:45:23 +01:00
Martin Gräßlin 7382b6d8b1 [kwin] Resolve path to ksmserver dbus interfaces through KWIN_SOURCE_DIR
This is a temporary solution to have less dependencies on
KDEBASE_WORKSPACE_SOURCE_DIR. Once kde-workspace is going to be splitted
this won't work, we need a proper way to find the dbus interfaces
provided by ksmserver.

Note: for appmenu the same problem exists, but doesn't affect us once we
are splitted as we can turn off the usage through a build option. So for
a splitted kde-workspace the appmenu dependency can just be temporarily
be removed.
2014-03-18 12:18:15 +01:00
Martin Gräßlin 9874187099 [kwin] Add a KWIN_SOURCE_DIR to the CMakeLists.txt
This is used to get to KWin's sources instead of
KDEBASE_WORKSPACE_SOURCE_DIR.
2014-03-18 12:08:14 +01:00
Martin Gräßlin dbf2218338 [kwin] kde4_add_ui_files -> qt5_wrap_ui
Less deprecated CMake usage.
2014-03-18 11:06:56 +01:00
Martin Gräßlin 3671b65001 [kwin] Do not depend on KDE4WORKSPACE_VERSION
KWin needs to have its own version. Split preparation.
2014-03-18 10:52:45 +01:00
Martin Gräßlin cb262a2bbb [kwin] Add used features from config-workspace.h to config-kwin.h
Adds HAVE_UNISTD_H and HAVE_MALLOC_H to config-kwin.h and gets used
in main.cpp. With that KWin does no longer need config-workspace.h.
2014-03-18 09:30:40 +01:00
Martin Gräßlin 6baf794f88 InputRedirection for keyboard events
Major new functionality is xkbcommon support. InputRedirection holds an
instance to a small wrapper class which has the xkb context, keymap and
state. The keymap is initialied from the file descriptor we get from the
Wayland backend.

InputRedirection uses this to translate the keycodes into keysymbols and
to QString and to track the modifiers as provided by the
Qt::KeybordModifiers flags.

This provides us enough information for internal usage (e.g. pass through
effects if they have "grabbed" the keyboard).

If KWin doesn't filter out the key events, it passes them on to the
currently active Client respectively an unmanaged on top of the stack.
This needs still some improvement (not each unmanaged should get the
event). The Client/Unmnaged still uses xtest extension to send the key
events to the window. So keylogging is still possible.
2014-03-18 09:00:50 +01:00
Martin Gräßlin 104e89aff2 Require xkbcommon for KWin's Wayland backend
FindXKB.cmake module and if XKB is not found Wayland
support is not enabled.
2014-03-18 09:00:50 +01:00
Martin Gräßlin 92761e9e30 [kwin] Fix ifdefs for Wayland
With the switch to FindWayland from ECM WAYLAND_FOUND was no longer set
thus the ifdef didn't work. Now we use HAVE_WAYLAND and HAVE_WAYLAND_EGL.
2014-03-18 09:00:49 +01:00
Martin Gräßlin f9704ff0df Add support for Wayland Cursor themes
WaylandSeat can install a cursor based on Qt::CursorShape using the
Wayland cursor theme library.
2014-03-18 09:00:49 +01:00
Martin Gräßlin 1617deabb8 Introduce the beginning of an InputRedirection class
So far this new class is not yet doing much. The WaylandBackend forwards
the received pointer events to this InputRedirection class. From there
signals are emitted to inform internal areas about the changes first.

The events are currently forwarded to X through the xtest extension. This
will be removed in future. Input will be forwarded directly to the
surface which wants it (no matter whether X11 or Wayland).
2014-03-18 09:00:49 +01:00
Martin Gräßlin 22fe6a2857 [kwin] Provide composited outline as QML instead of hand drawn FrameSvg
In order to get all our UI being written in QML, the Outline for
compositing is ported to QtQuick. It creates a QQmlContext and
QQmlComponent and loads the (currently hardcoded) qml file. The context
gets to properties exported: outline. The outline property allows the qml
to get the geometry it should use. The QQmlEngine is used from Scripting
thus all general scripting properties are exported (e.g. workspace).

The qml script is expected to create a QQuickWindow as it's root item
and style it.

The qml file is stored in a new qml subdirectory. The idea is that each
of the qml types we have gets an own directory there and for each
implementation there should be a further subdirectory.

Thus we have outline/plasma/ with outline being the type and plasma
being the implementation. But at the moment the script location is still
hardcoded.

REVIEW: 116123
2014-03-10 09:16:16 +01:00
Martin Gräßlin c7d986c7fe [kwin] Remove the legacy OpenGL 1 compositing backend
KWin already has a de facto OpenGL 2 dependency through QML. Combined
with the fact that the OpenGL 1 backend is basically unmaintained and
also unused, it's better to remove it for the new major release.

This change includes:
 * Removal of cmake option KWIN_BUILD_OPENGL_1_COMPOSITING
 * Removal of KWIN_HAVE_OPENGL_1 compile option and all code
   ifdef'ed with it (partially removal of if-else constructs)
 * Removal of CompositingType::OpenGL1Compositing (flags are kept
   as a core flag should get introduced)
 * Driver recommendation for OpenGL1Compositing changed to XRender
   (should be evaluated whether the drivers can provide GL2)
 * Removal of configuration option "GLLegacy"
 * Removal of fooMatrix function in kwinglutils
 * Removal of ARBBlurShader
 * Removal of legacy code path in GLVertexBuffer
 * Removal of GLShaderManager::disable
 * if-blocks with ShaderManager::instance()->isValid() removed

REVIEW: 116042
2014-03-10 08:59:11 +01:00
Martin Gräßlin f77fe3ebd9 [kwin] Install all DBus interfaces 2014-03-07 14:46:11 +01:00
Martin Gräßlin 4dff7888e3 [kwin] Drop build option to build without scripting
Scripting has proved it's point of being useful so it's time to turn it
into a mandatory part of KWin.

Also I start to use features provided by Scripting in more and more
parts of KWin core (e.g. sharing QQmlEngine) which makes it in the
long to complicated to have a build option and ifdefs for it.

REVIEW: 116587
2014-03-04 08:19:55 +01:00