Commit Graph

381 Commits (81eab11dbb5ccb7761430dc0c30dcc8428e1a4df)

Author SHA1 Message Date
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
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