Commit graph

20 commits

Author SHA1 Message Date
Martin Gräßlin
a029300ce5 Rework cursor image handling for Wayland
So far updating the cursor image was not really defined. It was possible
to use the cursor image from the wayland seat or have a custom set cursor
image. But there are no rules in place to decide which one to use when.

With this change a dedicated CursorImage class is introduced which tracks
the cursor image changes on the seat, on the decoration, in the effects
and so on. In addition it tracks which is the current source for the
image, that is whether e.g. the cursor from the seat or from effects
override should be used. Whenever the cursor image changes a signal is
emitted, which is connected to the signal in AbstractBackend.

Based on that the backends can directly show the image. The existing
code in the backends to install a cursor shape or to install the cursor
from the server is completely dropped. For the backend it's irrelevant
from where the image comes from.

A new feature added is that the cursor image is marked as rendered. This
is then passed on to the frame rendered in the Surface and thus animated
cursors are finally working. Unfortunately animated cursors are broken in
Qt (see https://bugreports.qt.io/browse/QTBUG-48181 ).
2016-02-25 08:14:48 +01:00
Martin Gräßlin
5cfe9428aa [backends/wayland] Use server side decorations if available 2015-12-18 16:41:49 +01:00
Martin Gräßlin
d89777bcac Make Wayland::EGL optional again
This is needed to make KWin build-able on non-Linux, but is actually
only a workaround. The dependency should also be available on non-Linux.

This disables the EGL integration in the Wayland backend (QPainter still
available) and the EGL fallback in the qpa plugin (preferred context
sharing still available, but requires a working OpenGL Scene).

REVIEW: 126202
2015-12-01 07:58:47 +01:00
Martin Gräßlin
898eefc6be [backends/wayland] Use BasicScreens implementation 2015-11-17 10:43:10 +01:00
Martin Gräßlin
75c82fce19 [backends/wayland] Only set socket name if it got sepcified
If we don't have a dedicated device identifier we should use the default
mechanismn which involves using the WAYLAND_DISPLAY or WAYLAND_SOCKET env
variable.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
930e56767e [backends/wayland] Do not query outputs
Not needed, we use a nested window.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
3f6cb8812b [backends/wayland] ShellSurface opened as a toplevel instead of fullscreen
Going towards nested setup.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
eafded7127 [backends/wayland] Drop subsurface for cursor
As we don't use the fullscreen shell any more, we use the "normal"
cursor image handling of wl_seat.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
1ca690d4ee [backends/wayland] Drop support for fullscreen shell
We are going to switch to a proper nested approach similar to the
x11 backend. Given that we don't want to run on fullscreen anymore
but just open a nested window.
2015-11-17 09:51:50 +01:00
Martin Gräßlin
06aacf4f65 Drop cmakedefine HAVE_WAYLAND_EGL
Now a required build dependency.
2015-08-12 11:39:20 +02:00
Martin Gräßlin
a6c6408f54 Drop cmakedefine HAVE_WAYLAND_CURSOR
Now a required build-dep.
2015-08-12 11:39:20 +02:00
Martin Gräßlin
53004b95ff Port left over qDebug to qCDebug 2015-07-31 13:25:51 +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
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
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
f7bf7cb7ba [wayland] Move WaylandQPainterBackend into backends/wayland 2015-05-05 15:13:36 +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
Renamed from wayland_backend.cpp (Browse further)