Commit graph

472 commits

Author SHA1 Message Date
Martin Gräßlin
9ca992a329 [wayland] Drop methods on Toplevel to send input events
No longer needed as InputRedirection sends input events directly
through the SeatInterface. In addition this drops the dependency on
xtest.
2015-03-17 10:20:20 +01:00
Martin Gräßlin
7369a2c3a5 [kwin_wayland] Support using platform wayland for the QPA
This reorders the startup sequence quite a bit:
1. Create QAbstractEventDispatcher and install it on QCoreApplication
2. Create Application
3. Start Xwayland, use thread to get when its ready
4. Create xcb connection
5. perform startup

For using the wayland QPA it needs a patch in QtWayland which will be
part of Qt 5.4.2, otherwise it blocks.
2015-03-17 10:20:19 +01:00
Martin Gräßlin
47bdce074e Let the fun begin: start a WaylandServer in kwin_wayland
The WaylandServer is at the moment only used to support starting an
Xwayland. It does not support Wayland clients yet, so don't get
excited.

For Xwayland it's using the trick of creating the Display before the
QApplication is created with manual event dispatching.
2015-03-17 10:08:27 +01:00
Jonathan Riddell
01aae2fa20 add include(ECMOptionalAddSubdirectory) 2015-02-19 17:12:34 +01:00
Jonathan Riddell
325a479e6e add include(ECMOptionalAddSubdirectory) 2015-02-19 17:12:18 +01:00
Lukáš Tinkl
ae3d2092eb extract UI messages correctly 2015-02-19 14:41:03 +01:00
Lukáš Tinkl
c59f911487 extract UI messages correctly 2015-02-19 14:38:22 +01:00
Martin Gräßlin
5312e5b878 Update KF5 requirement to 5.8 2015-02-19 12:29:04 +01:00
Jonathan Riddell
84954b9e4f Update version number for 5.2.1 2015-02-19 11:34:15 +01:00
Martin Gräßlin
caf99f83d5 Require Qt 5.4
REVIEW: 122617
2015-02-19 10:56:50 +01:00
Martin Gräßlin
551b3a4c48 Switch to xcb for sync extension
Since XCB 1.10 the sync extension is working properly. At the time of
the 5.3 release 1.10 will have been out for ~15 months, enough time
for distros to catch up and should allow us to use it.

As our CI system only supports 1.9 at the moment we cannot hard depend
on the version, instead we use feature info. As soon as our CI system
supports it, we should update the required min version and kick out the
ifdef.

REVIEW: 122377
2015-02-06 13:43:15 +01:00
Martin Gräßlin
0faf2fbcf8 Use xcb_cursor library instead of Xlib based one in Cursor
Straight forward port from XLib based XCursor library to the
xcb variant which is considerably new. The xcb variant only allows
to create xcb_cursor_t for the default theme and size. Which suits
the needs in Cursor quite well, but means it's not a replacement for
the usage in zoom effect.

REVIEW: 122290
2015-02-06 13:41:18 +01:00
Martin Gräßlin
87caab24ca Drop support for XFree86-VidModeExtension
Was only used as fallback for older NVIDIA drivers. At the same time
also drop the call to nvidia-settings which was also only used as
a fallback for refresh rate detection.

REVIEW: 122423
2015-02-04 14:45:53 +01:00
Martin Gräßlin
65fe7e6fc2 Merge branch 'Plasma/5.2' 2015-01-28 16:22:49 +01:00
Martin Gräßlin
a93a2ab191 Disable libinput integration if >= 0.8 is found
libinput 0.8 is incompatible causing the build to fail. As we are in
dependency freeze the only option is to disable the build.

BUG: 342893
FIXED-IN: 5.2.1
2015-01-28 16:20:57 +01:00
Jonathan Riddell
f26845cf8f Update version number for 5.2.0 2015-01-22 11:34:22 +01:00
Jonathan Riddell
91fc71b243 Update version number for 5.2.90 2015-01-13 11:18:53 +01:00
Jonathan Riddell
3f6524da8b Update version number for 5.1.95 2015-01-08 11:43:14 +01:00
Martin Gräßlin
ac664d8455 Delete libkdecorations
Not used anywhere in kwin any more.
2014-12-02 15:29:21 +01:00
Martin Gräßlin
4188736bc4 Stop building libkdecorations
Some defines are still used, so it's not yet deleted.
2014-12-02 09:58:29 +01:00
Martin Gräßlin
c2e53b9a2f Merge branch 'kdecorations2'
Conflicts:
	effects.cpp
	paintredirector.cpp
2014-12-02 08:38:10 +01:00
Martin Gräßlin
2eb876743c [screens] Replace DesktopWidgetScreens by XRandRScreens
A new implementation of the Screens interface is added which uses XRandR
directly instead of relying on QDesktopWidget. The implementation is
provided in a new implementation file screens_xrandr.cpp.

XRandRScreens comes with a unit test. Unfortunately it's rather difficult
to provide a proper unit test against XRandR. Xvfb (which is obviously
used on the CI system) doesn't provide the XRandR extension. Also on a
"normal" developer system one would not want to just execute the test as
the results are not predictable (number of available outputs?) and the
test would mess up the setup resulting in nobody wanting to execute the
test.

As a solution to both problems the unit test starts Xephyr as a nested
X server. This allows to have at least some limited tests against XRandR.
Nevertheless there are a few things which I was not able to test:
* multiple outputs
* no output at all

The nested X Server approach makes the interaction rather complex. Qt
opens it's connection against the main X Server thus QX11Info provides
a wrong connection and also KWin::connection() which is heavily used by
xcbutils and thus all the RandR wrappers have the wrong connection. To
circumvent this problem the test is GUILESS. In case it would call into
any code using QX11Info, it would probably either runtime fail or crash.

REVIEW: 117614
2014-11-27 09:00:19 +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
Frank Osterfeld
4dc2ad22d7 Add libepoxy's include directory 2014-11-04 10:31:03 +01:00
Martin Gräßlin
8dd0a8163f [kcmkwin/kwindecoration] Import a new decoration configuration module
Following features are supported:
* finds all plugins
** finds all themes for a theme-engine plugin
* renders previews for the plugin/themes
* loads currently used plugin/theme
* saves selected plugin/theme
* triggers config reload in KWin

Following features are currently not supported:
* Search
* Plugin configuration
* GHNS
* Button configuration
2014-10-31 07:53:04 +01:00
Frank Osterfeld
3945b59ade Add libepoxy's include directory 2014-10-24 21:58:59 +02:00
Martin Gräßlin
0a6a69b2d0 Improve handling of KWIN_HAVE_EGL in CMakeLists.txt
KWIN_HAVE_EGL was set to EGL_FOUND which doesn't make sense as EGL is
marked as a runtime dependency. Instead a new build option KWIN_BUILD_EGL
is added defaulting to ON. If set to OFF neither the X11 nor the Wayland
EGL backend are built.

CCBUG: 340171
2014-10-21 16:06:58 +02:00
Martin Gräßlin
706e22a12b Do not find OpenGL or OpenGLES
As we use epoxy we don't need them any more. KWin compiles, links and
runs just fine without ever trying to find OpenGL or OpenGLES.

BUG: 340170
FIXED-IN: 5.2.0
2014-10-21 08:33:51 +02:00
Martin Gräßlin
e32da9d9e0 Merge branch 'master' into kdecorations2
Conflicts:
	CMakeLists.txt
	paintredirector.cpp
	scene_opengl.h
	scene_qpainter.h
	scene_xrender.h
2014-10-20 16:04:52 +02:00
Martin Gräßlin
a918591fef Use Logind to open/close devices needed by libinput
With libinput we have the problem that we need to have privileges to
open the device files. In order to not need wrappers or suid bits, we
use logind. This means that kwin_wayland has to be the session controler.

A LogindIntegration is added to connect to logind and wrap the dbus
calls. This is based on the logind integration done for ksld in
ksmserver. The LogindIntegration is started by Workspace and the
InputRedirection tries to become the session controller and starts the
libinput integration only after this succeeded.
2014-10-20 14:51:24 +02:00
Martin Gräßlin
c4bb3d11fc Initial support for libinput
Libinput is an optional dependency for getting low level input events.
As opening the input devices requires root privs this is rather
pointless in the current state. But there is a small added test app which
can be executed with root privs to demonstrate the functionality. To
properly get input events we need a wrapper like it's used in weston.

So far the following is setup:
* opening devices found by udev
* forwarding keyboard events to InputRedirection
* forwarding pointer button events to InputRedirection
* forwarding pointer axis events to InputRedirection
* signals emitted for pointer motion events

Pointer motion events need some further work as they are provided
as delta events. We need to track that and map them properly.

Also missing are touch events due to me not having a touch screen.
It should be fairly simple to setup the touch events, though.

Also hotplugging of devices is not yet implemented.
2014-10-20 14:51:24 +02:00
Jonathan Riddell
b23a19e93b Update version number for 5.2 development 5.1.90 2014-10-14 12:34:56 +02:00
Jonathan Riddell
15e41ce842 Update version number for 5.1.0 2014-10-09 11:11:41 +02:00
Martin Gräßlin
237ee7fcc7 wayland_client and wayland_server moved to kwayland
kwayland is provided by kde:kwayland and is located at
kde/workspace/kwayland

It's an optional build dependency needed only for kwin_wayland.
2014-09-19 13:59:51 +02:00
Martin Gräßlin
58adbe4d80 Add KF5 version requirement to 5.3.0
5.3.0 is the next upcoming release and we currently depend on new
features added to KWindowSystem.
2014-09-19 07:44:42 +02:00
Fredrik Höglund
29795f49e8 Add support for GLX in Xcb::Extensions 2014-09-18 20:21:20 +02:00
Fredrik Höglund
869ebdd4c0 Add an X11EventFilter class
This class provides an event filter, specific to an event type, that
can be registered with Workspace to filter events.
2014-09-18 20:21:20 +02:00
Alex Richardson
b0b9ef4457 Fix build with clang
The wayland protocols need the .c files compiled in gnu90 mode.

All known compilers used for kwin support the -std= flag, so setting it
unconditionally should be fine

REVIEW: 120231
2014-09-17 14:28:30 +02:00
Martin Gräßlin
73098cbfdc Split out WaylandScreens into own header and source file
This reduces the needed ifdefs in screens and makes it easier to
unit test Screens.
2014-09-17 09:05:11 +02:00
Martin Gräßlin
1e230fda77 [kwin_wayland] Initial addition of the WaylandServer module
So far this new module contains:
* Display
* OutputInterface

Display manages the server socket and server event loop. In general it's
the entry point to any part of the server.

OutputInterface is the abstraction for the wl_output interface on server
side. An OutputInterface is created through the Display.

The auto tests for ConnectionThread and Output are adjusted to use the
internal server instead of starting Weston. Especially the Output test
could be extended to test much more as we have absolute control over
the server now.
2014-09-02 09:52:16 +02:00
Bernd Steinhauser
9ec2272dc3 Fix target dependencies. 2014-08-29 12:49:04 +02:00
Martin Gräßlin
46f2b252d8 [kwin_wayland] Create dedicated classes for Seat, Keyboard and Pointer
Split out from wayland_backend. So far no unit test as there is no proper
way to simulate input events.
2014-08-27 08:57:06 +02:00
Martin Gräßlin
0b0a48ca08 [kwin_wayland] Create a dedicated class for Compositor
Wraps the compositor interface.
2014-08-27 08:57:06 +02:00
Martin Gräßlin
08ab2c424e [kwin_wayland] Split out Buffer and ShmPool into dedicated files
Moved from wayland_backend.[h|cpp] to buffer.[h|cpp] and
shm_pool.[h|cpp]. Buffer is slightly adjusted to have the ShmPool
passed in as a ctor argument and the ctor is private and friended with
ShmPool, so that it can only be constructed from ShmPool.
2014-08-27 08:57:06 +02:00
Martin Gräßlin
ce8c4240f7 [kwin_wayland] Create a dedicated Surface class
A Surface class is split out which holds a wl_surface and supports
attaching a buffer, setting the damage and emitting a signal when the
frame callback got called.

It doesn't come with a unit test yet as it first needs the ShmPool
and Buffer properly split out to easily set it up.
2014-08-27 08:57:06 +02:00
Martin Gräßlin
8c4bc3ba45 [kwin_wayland] Split out wl_shell and wl_shell_surface into dedicated classes
New classes Shell and ShellSurface are created. Both are in shell.[h|cpp]
to indicate their close relationship with the Shell having to create the
ShellSurface.

WaylandBackend is adjusted to hold a Shell* and ShellSurface* instead of
the lower level structs. This also required adjustements to the creation
of the Backend as it now doesn't set a default size any more. Thus the
backendReady signal may not be emitted before the initial configure
event arrived. This also makes it easier to support either the fullscreen
shell or wl_shell at the same time.

Of course a unit test is added for the two new classes. This needs to
be extended once we have more control over the mock Wayland server.
2014-08-27 08:57:06 +02:00
Martin Gräßlin
d2f1e936f1 [kwin_wayland] Move Wayland::Output into dedicated source files
At the same time adding an autotest for the Output, moving the listener
into the Output class and providing enums for Subpixel and Transform.

KWin now requires wl_ouput interface version 2 as that allows us to emit
the changed signal in a better way.

The unit test is not yet capable of testing everything, we need a mock
Wayland server which is more flexible.
2014-08-27 08:57:05 +02:00
Martin Gräßlin
d19b6c0241 [kwin-wayland] Add support for FullscreenShell
The FullscreenShell is a Wayland protocol provided by Weston to have
exactly one surface per output. This is exactly what KWin needs. So
in case the Wayland server we connect to provides the FullscreenShell
we prefer it over the normal Shell and mapping our surface as fullscreen.

The protocol is not yet part of wayland-client library, so the header
and source file needs to be generated. This is done during the build
process using the external tool wayland-scanner. The protocol
description is copied from the Westion 1.5 sources.

REVIEW: 119839
2014-08-27 08:55:40 +02:00
Hrvoje Senjan
d880f7418c Don't install 'devel' symlink of KWin shared library
As it is not public, no headers installed, etc, no need to install the symlink.
REVIEW: 119835
2014-08-25 12:49:03 +02:00
Jonathan Riddell
dc554ed256 use standard way to version applications in Plasma 2014-08-20 15:43:27 +02:00
Martin Gräßlin
bd5fe4f785 [kwin_wayland] Add a Wayland::Registry class
The Wayland::Registry class wraps wl_registry handling. It keeps track
of the interfaces in the registry and emits signals whenever a known
interface gets announced or removed. So far it only tracks the interfaces
which are used and needed by KWin.
2014-08-18 14:05:35 +02:00
Martin Gräßlin
697d9f884f Fix soversion of libkwin in CMakeLists.txt 2014-08-18 12:32:02 +02:00
Martin Gräßlin
3185530ed6 [kwin-wayland] Create dedicated thread for wayland connection
The Wayland event queue is moved into a dedicated thread and a
new class is created for just creating the connection and listening
for events. The WaylandBackend creates the thread and uses an event
queue for the main thread.

REVIEW: 119761
2014-08-18 08:51:24 +02:00
Martin Gräßlin
f9a7b94ee7 Create dedicated kwin_x11 and kwin_wayland binaries
All of kwin except the main function goes into a new (private) library
called kwin. Two new kdeinit_executables are created:
* kwin_x11
* kwin_wayland

Both only use a dedicated main_x11.cpp and main_wayland.cpp with the
main function and a KWin::Application subclass and linking the new
kwin library.

The main idea behind this is to be able to perform more sane sanity
checks. E.g. on Wayland we don't need to first test whether we can
create an X11 connection. Instead we should abort if we cannot connect
to the Wayland display. Also the multi-head checks are not needed on
Wayland, etc. etc. As most of that code is in the main function to
simplify it's better to split.

This will also make it easier to diverge more easily in future. The
Wayland variant can introduce more suited command line arguments for
example. This already started by having the --replace option only
available in X11 variant. The Wayland backend is still a window manager,
but doesn't claim the manager selection.
2014-08-18 08:50:44 +02:00
Kai Uwe Broulik
16c432562d Merge branch 'Plasma/5.0' 2014-08-11 12:27:40 +02:00
Jonathan Riddell
8e30ae413e Increase version to 5.0.1 for bugfix release 2014-08-07 10:47:52 +02:00
Martin Gräßlin
0030eb7f84 Initial import of support for new KDecoration2 based decorations
NOTE: this is not working completely yet, lots of code is still ifdefed
other parts are still broken.

The main difference for the new decoration API is that it is neither
QWidget nor QWindow based. It's just a QObject which processes input
events and has a paint method to render the decoration. This means all
the workarounds for the QWidget interception are removed. Also the paint
redirector is removed. Instead each compositor has now its own renderer
which can be optimized for the specific case. E.g. the OpenGL compositor
renders to a scratch image which gets copied into the combined texture,
the XRender compositor copies into the XPixmaps.

Input events are also changed. The events are composed into QMouseEvents
and passed through the decoration, which might accept them. If they are
not accpted we assume that it's a press on the decoration area allowing
us to resize/move the window. Input events are not completely working
yet, e.g. wheel events are not yet processed and double click on deco
is not yet working.

Overall KDecoration2 is way more stateful and KWin core needs more
adjustments for it. E.g. borders are allowed to be disabled at any time.
2014-07-25 14:02:26 +02:00
Fredrik Höglund
3b8b1455a6 Use libepoxy to resolve GL functions
Remove the manually written GL dispatch code, and use libepoxy
to resolve functions.

The only exceptions are GLX_MESA_swap_control, which is not in
the XML API registry, and GL_ARB_robustness/GL_EXT_robustness.
For the latter we want to resolve the functions to the same names
on both GLES and desktop GL, and plug in our own implementations
when the extension is not supported.
2014-07-14 12:04:37 +02:00
Fredrik Höglund
01e1aef395 Find libepoxy 2014-07-14 12:04:37 +02:00
Jonathan Riddell
97f38e3e87 bump versions for... Plasma 5.0! 2014-07-10 15:45:41 +02:00
Jonathan Riddell
ce48a1b27b bump version for Plasma 5 RC release 2014-07-03 15:22:25 +02:00
Hrvoje Senjan
25c731ab7e Install KWin icons to hicolor namespace
1) helps avoid clashing with 4.x version
2) it's more correct to have them in hicolor

REVIEW: 118932
2014-06-27 13:20:49 +02:00
Hrvoje Senjan
52653aaede Rename KWin binary to kwin_x11
This servers two purposes.
1. it makes KWin/5 co-installable with KWin/4 as now binary and
   all libraries etc. are renamed or installed to a different
   location.
2. In future we need a dedicated X11 and Wayland main function
   anyway. Thus it makes most sense to rename to kwin_x11 directly
   instead of first renaming to kwin5. The reason why we need to
   have dedicated main functions is that kwin needs to check early
   whether X11 is working or Wayland is working. Right now the first
   thing kwin does is trying to connect to the XServer. This happens
   before the QApplication is constructed and before command line
   args are processed. On Wayland we won't want to test whether we
   can connect to the XServer. As it's too early to check whether we
   are starting kwin for X11 or Wayland the most convenient way is to
   have dedicated binaries - thus a rename is needed. Just renaming
   kwin for wayland is also not a good idea as in future the "main"
   kwin will be for wayland not for X11. Another case for the dedicated
   binaries is the Application class, which right now first tries to
   claim the X11 Window Manager Selection. Again on Wayland even with
   XWayland we won't need that. KWin will be the window manager for
   XWayland if KWin is the Wayland compositor. There is no need to even
   try to support anything else. Most likely it will even be KWin to
   start the XWayland server, so we can be sure that there is no other
   WM running and thus no need to claim the selection and abort if it
   fails.

REVIEW: 118266
2014-06-16 15:34:34 +02:00
Martin Gräßlin
060c93233e Make xcb-icccm truely optional
ICCCM dependency is a beast due to two different existing versions in
different packages. Thus it cannot be a hard dep without causing problems
for our downstreams.

This change ensures that ICCCM is really considered as an optional dep
and that the version we need is found, if not we mark it as non-found.

ICCCM is only used by one test application which can easily be disabled
and some enum values are used in events.cpp. If ICCCM is not found those
are replaced by defines generated in config-kwin.h.

BUG: 336035
2014-06-11 07:51:07 +02:00
Martin Gräßlin
a290209b3d Create dedicated class for CompositorDBusInterface
Similar to the already existing DBusInterface wrapper for the
org.kde.KWin interface a new CompositorDBusInterface is introduced for
org.kde.kwin.Compositing.

That way the DBus interface is split from the implementation and DBus
specific methods are no longer required in the Compositor class.

The deprecated DBus methods
* toggleCompositing(bool)
* setCompositing(bool)

are removed.

REVIEW: 118463
2014-06-10 10:52:25 +02:00
Jonathan Riddell
39cf764378 bump version number for beta 2 2014-06-05 12:31:29 +01:00
Martin Gräßlin
6afc82196f Fix installing of icons
REVIEW: 118261
2014-06-02 14:56:42 +02:00
Martin Gräßlin
3629fcca23 Update required Qt version to 5.3 2014-05-20 14:16:49 +02:00
Martin Gräßlin
32bcd59fc9 Require at least gcc 4.8
Code doesn't compile with gcc 4.7 any more. We need a version check
anyway as ECM only requires 4.5 which is way too old.

REVIEW: 118121
2014-05-15 11:12:03 +02:00
Jonathan Riddell
d043cd67b9 change version to 4.96.0 for beta 2014-05-09 15:55:15 +01:00
Martin Gräßlin
e4be4082a0 Require xkbcommon 0.4.1
That's the version required in Qt 5.3 and causing issues if there's a
mismatch in versions.

CCBUG: 333459
2014-04-28 12:07:28 +02:00
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