387 Commits (e340d1ba05c5d8b3700d9fd41014e753330a46a1)

Author SHA1 Message Date
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.
10 years ago
Fredrik Höglund 29795f49e8 Add support for GLX in Xcb::Extensions 10 years ago
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.
10 years ago
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
10 years ago
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.
10 years ago
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.
10 years ago
Bernd Steinhauser 9ec2272dc3 Fix target dependencies. 10 years ago
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.
10 years ago
Martin Gräßlin 0b0a48ca08 [kwin_wayland] Create a dedicated class for Compositor
Wraps the compositor interface.
10 years ago
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.
10 years ago
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.
10 years ago
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.
10 years ago
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.
10 years ago
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
10 years ago
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
10 years ago
Jonathan Riddell dc554ed256 use standard way to version applications in Plasma 10 years ago
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.
10 years ago
Martin Gräßlin 697d9f884f Fix soversion of libkwin in CMakeLists.txt 10 years ago
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
10 years ago
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.
10 years ago
Kai Uwe Broulik 16c432562d Merge branch 'Plasma/5.0' 10 years ago
Jonathan Riddell 8e30ae413e Increase version to 5.0.1 for bugfix release 10 years ago
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.
10 years ago
Fredrik Höglund 01e1aef395 Find libepoxy 10 years ago
Jonathan Riddell 97f38e3e87 bump versions for... Plasma 5.0! 10 years ago
Jonathan Riddell ce48a1b27b bump version for Plasma 5 RC release 10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
Jonathan Riddell 39cf764378 bump version number for beta 2 10 years ago
Martin Gräßlin 6afc82196f Fix installing of icons
REVIEW: 118261
10 years ago
Martin Gräßlin 3629fcca23 Update required Qt version to 5.3 10 years ago
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
11 years ago
Jonathan Riddell d043cd67b9 change version to 4.96.0 for beta 11 years ago
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
11 years ago
Alex Merry 4804964b3d Install kwin.notifyrc to the correct location 11 years ago
Alex Merry e5a1f9b309 Remove CONFIG argument from find_package(KF5)
This is no longer wanted, since ECM has a FindKF5 module.
11 years ago
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
11 years ago
Michael Palimaka 1bca6c3dfa Disable testing if QtTest is not found.
REVIEW: 117393
11 years ago
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
11 years ago
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
11 years ago
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
11 years ago
Àlex Fiestas 2ecc67dcdc Remove CMake no longer needed for spltited repos.
Mostly remove
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
11 years ago
David Faure 924b8b5a9e Fix compilation on OpenSuSE 13.1 which puts xkbcommon.h in /usr/include/pkg/libxkbcommon/xkbcommon/ 11 years ago
Jonathan Riddell 7f345a386b update versions to 4.95.0 for Plasma 2014.6 Alpha 1 11 years ago
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.
11 years ago
À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)
11 years ago
Àlex Fiestas 9576c55fe6 Use CMAKE_SOURCE_DIR instead of KDEBASE_WORKSPACE_SOURCE_DIR
Allows us to remove project() from the root CMakeLists.txt
11 years ago
À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.
11 years ago