427 Commits (6bf44b7db487e27635ebc69fa60acad76568e1f4)

Author SHA1 Message Date
Martin Gräßlin 6bf44b7db4 [wayland] Add an X11 output backend
This new backend allows to start a kwin_wayland server nested on an
X-Server by using a normal X11 window as output. This allows testing
kwin_wayland without needing to start another Wayland server first.

The behavior is triggered by using new command line arguments:
--windowed
--x11-display=<:0>

With optional --width and --height arguments.

In this mode the WaylandBackend is not created at all.

So far the backend is not fully integrated yet and only the QPainter
backend supports this mode.
10 years ago
Martin Gräßlin e886bd7c78 Adjust to newer libinput and require at least 0.10
There was API changes regarding axis event handling.
CCBUG: 342893
10 years ago
Aleix Pol f6db54618b Merge branch 'Plasma/5.2' 10 years ago
Aleix Pol 25f71d1a12 Fix build 10 years ago
Martin Gräßlin 371bd4c24f [wayland] Use Surface::setCursor and ::hideCursor in WaylandBackend
Replaces the low level wayland calls and also means that we no longer
need the Wayland client library. Everything wrapped in KWayland.
10 years ago
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.
10 years ago
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.
10 years ago
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.
10 years ago
Jonathan Riddell 01aae2fa20 add include(ECMOptionalAddSubdirectory) 10 years ago
Jonathan Riddell 325a479e6e add include(ECMOptionalAddSubdirectory) 10 years ago
Lukáš Tinkl ae3d2092eb extract UI messages correctly 10 years ago
Lukáš Tinkl c59f911487 extract UI messages correctly 10 years ago
Martin Gräßlin 5312e5b878 Update KF5 requirement to 5.8 10 years ago
Jonathan Riddell 84954b9e4f Update version number for 5.2.1 10 years ago
Martin Gräßlin caf99f83d5 Require Qt 5.4
REVIEW: 122617
10 years ago
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
10 years ago
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
10 years ago
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
10 years ago
Martin Gräßlin 65fe7e6fc2 Merge branch 'Plasma/5.2' 10 years ago
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
10 years ago
Jonathan Riddell f26845cf8f Update version number for 5.2.0 10 years ago
Jonathan Riddell 91fc71b243 Update version number for 5.2.90 10 years ago
Jonathan Riddell 3f6524da8b Update version number for 5.1.95 10 years ago
Martin Gräßlin ac664d8455 Delete libkdecorations
Not used anywhere in kwin any more.
10 years ago
Martin Gräßlin 4188736bc4 Stop building libkdecorations
Some defines are still used, so it's not yet deleted.
10 years ago
Martin Gräßlin c2e53b9a2f Merge branch 'kdecorations2'
Conflicts:
	effects.cpp
	paintredirector.cpp
10 years ago
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
10 years ago
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
10 years ago
Frank Osterfeld 4dc2ad22d7 Add libepoxy's include directory 10 years ago
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
10 years ago
Frank Osterfeld 3945b59ade Add libepoxy's include directory 10 years ago
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
10 years ago
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
10 years ago
Martin Gräßlin e32da9d9e0 Merge branch 'master' into kdecorations2
Conflicts:
	CMakeLists.txt
	paintredirector.cpp
	scene_opengl.h
	scene_qpainter.h
	scene_xrender.h
10 years ago
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.
10 years ago
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.
10 years ago
Jonathan Riddell b23a19e93b Update version number for 5.2 development 5.1.90 10 years ago
Jonathan Riddell 15e41ce842 Update version number for 5.1.0 10 years ago
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.
10 years ago
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