Commit graph

25 commits

Author SHA1 Message Date
Martin Gräßlin
6581bc62a3 [drm] Fix KConfigGroup resolution for edid overwrite
If one of the edid group identifiers cannot be used as it's empty,
replace it by "unknown".

REVIEW: 123848
2015-05-19 15:55:53 +02:00
Martin Gräßlin
f30eb50756 [drm] Implement Screens::refreshRate 2015-05-19 09:49:37 +02:00
Martin Gräßlin
f5d123d61e [drm] Implement Screens::name
As name of screen we use the information passed to the OutputInterface:
a combination of manufacturer and model name.
2015-05-19 09:35:57 +02:00
David Edmundson
5115d54926 Multitouch on hwcomposer
REVIEW: 123796
2015-05-15 13:28:29 +01:00
Martin Gräßlin
d6700ff9f9 [backends/hwcomposer] Forward input events to main thread
Libhybris input events are generated in a different thread, but we want
them in the main thread (InputRedirection and KWayland are not (yet)
thread safe). Thus all events need to be send to the main thread using
QMetaObject::invokeMethod.
2015-05-11 15:43:30 +02:00
Martin Gräßlin
d5d304c2f6 [backends/hwcompser] Toggle blank screen on power button press
Also blocks compositor while screen is turned off.
2015-05-11 15:24:23 +02:00
Martin Gräßlin
533a39bc3e [backends/hwcomposer] Perform mapping of key codes
Not all key codes are mapped yet. Those not mapped have KEY_RESERVED
as mapping value and those are not forwarded to InputRedirection.
2015-05-11 14:28:32 +02:00
Martin Graesslin
6a66d84f5c [backends/hwcomper] Initial support for input handling
Unfortunately on libhybris enabled systems libinput doesn't work, thus
the backend needs to handle input events which can be read from hybris.
So far the backend only handles touch events properly, though some
aspects look wrong. E.g. motion gives only for one touch contact point.
Unfortunately the documentation is quite weak, so there might be
something important missing.
2015-05-09 16:22:27 +02:00
Martin Gräßlin
1f62c0acb0 [backends/hwcomposer] Handle OutputInterfaces in Backend
Allows to read the DPI information and export the physical display
size from it. DPI is scaled by 1000 in hwcomposer, split by X and Y,
which allows to calculate size in mm from pixel size.
2015-05-08 21:41:38 +02:00
Martin Graesslin
e12400a675 Add a hwcomposer backend based on libhybris
This backend interacts with libhybris to create a hwcomposer which is
used for creating the egl context and surface. The initial version of
this backend is based on test_hwcomposer.cpp provided by libhybris.

Please note that using the hwcomposer backend requires a newer libepoxy,
the latest stable release is not able to bring up OpenGLES, so one needs
a master build of libepoxy.

Notes on licensing:
libhybris is Apache 2.0 licensed, which is not compatile with GPLv2.
But it is compatible with GPLv3. Thus the source files in the hwcomposer
backend are licensed GPLv3+ and not GPLv2+ as the rest of KWin. If one
uses KWin without the hwcomposer backend (which is obviously the default)
the licence doesn't change. But if the hwcomposer backend is used the
overall license of KWin changes to GPLv3+.
2015-05-08 10:28:52 +02:00
Martin Gräßlin
2220ae44c4 Create a plugin for each of the wayland backends
Each of the backends becomes a plugin. This allows kwin_wayland to load
the requested plugin and kwin itself doesn't need to link all the
libraries needed. E.g. libdrm is no longer linked if running kwin_x11.
Also this allows to create backends for the non-standard EGL platforms
(examples could be raspberrypi or Android devices).
2015-05-06 10:31:39 +02:00
Martin Gräßlin
33fb763e37 [wayland] Introduce a deviceIdentifier in AbstractBackend
To be used by the concrete backends for e.g. framebuffer device name,
DISPLAY or WAYLAND_DISPLAY variable.
2015-05-06 09:38:18 +02:00
Martin Gräßlin
d45cf6ee8d [wayland] Add an initialWindowSize to AbstractBackend
Useful for windowed backends like X11 and Wayland.
2015-05-06 09:26:51 +02:00
Martin Gräßlin
17d5839580 [wayland] AbstractBackend can emit an initFailed signal
Replaces the custom handling for Wayland and X11 Backend. Now they can
just emit the initFailed signal.
2015-05-06 09:26:51 +02:00
Martin Gräßlin
0782252f72 [wayland] AbstractBackend provides signal screensQueried
With this change all backends need to emit the screensQueried signal
at some point. So far only x11 backend did not provide the signal,
wayland had a comparable delayed init mechanism. Now all backends use
the same mechanism.
2015-05-06 09:05:37 +02:00
Martin Gräßlin
b2f5873a28 [wayland] X11WindowedBackend anounces input support by itself
It's the one knowing what it supports, no need to do it outside.
2015-05-06 09:05:37 +02:00
Martin Gräßlin
c4f8bed815 [wayland] Use a pure virtual AbstractBackend::init method
Two backends already used an init method, let's make that the same
in all backends to be able to have shared startup code.
2015-05-06 08:34:26 +02:00
Martin Gräßlin
2afaa60dc5 [wayland] A backend can mark whether it is ready
Replaces the functionality of the WaylandBackend and makes it available
to all backends by providing the functionality directly in
AbstractBackend. By default a backend is not ready and the implementation
must call setReady(true) to indicate that setup has finished
successfully. The compositor won't start till the backend indicates that
it is ready.
2015-05-05 19:05:31 +02:00
Martin Gräßlin
8ff394a020 [wayland] Dedicate logging category for each of the backends 2015-05-05 17:47:03 +02:00
Martin Gräßlin
767ca8d357 [wayland] Don't call into X11WindowedBackend from EglOnXBackend
Instead of having a ctor which takes the backend, it's a ctor which
takes all the information needed from the backend.
2015-05-05 15:35:12 +02:00
Martin Gräßlin
d80984beab [wayland] Move X11WindowedQPainterBackend into backends/x11 2015-05-05 15:23:53 +02:00
Martin Gräßlin
f7bf7cb7ba [wayland] Move WaylandQPainterBackend into backends/wayland 2015-05-05 15:13:36 +02:00
Martin Gräßlin
df6221ae4a [wayland] Move FramebufferQPainterBackend into backends/fbdev 2015-05-05 15:07:01 +02:00
Martin Gräßlin
06d8206192 [wayland] Move DrmQPainterBackend into backends/drm 2015-05-05 13:32:33 +02:00
Martin Gräßlin
72db1e63a3 [wayland] Move backend implementations into a backends/<name> directory
The aim is to be able to create a plugin for each of the backends.
The following directories are created:
* backends/drm
* backends/fbdev
* backends/wayland
* backends/x11
2015-05-05 13:05:37 +02:00