Commit Graph

12 Commits (bfb52b20c9c7edfee7f3c2a74ad6ce41ee599f88)

Author SHA1 Message Date
Martin Gräßlin d60c377890 [wayland] Introduce a ShellClient
The ShellClient is a Toplevel subclass for a
KWayland::Server::ShellSurfaceInterface. It gets created when a new
ShellSurfaceInterface is created and destoryed when it gets unmapped.

So far the usage is still rather limited. The ShellClient is opened
at position (0/0). While it's possible to pass pointer events to it,
it's not yet possible to activate it, so no keyboard focus.
2015-05-08 12:43:44 +02:00
Martin Gräßlin 603844cf98 [wayland] Allow the AbstractBackend subclasses to manage OutputInterfaces
This gives the backend more control without needing to provide all
information in Screens.
2015-04-24 12:03:20 +02:00
Martin Gräßlin 8ec3f55ff4 [wayland] Abort if Xwayland connection breaks
If Xwayland goes down it's better to abort than staying alive. If
Xwayland goes down the next roundtrip to X (most likely during call
to xStackingOrder) will just freeze completely, which is kind of the
worst as one cannot VT-switch anymore. So a clean abort is a bad but
better solution.
2015-04-21 09:21:49 +02:00
Martin Gräßlin d2cd10861b [wayland] Use a DPI of 96 to calculate physical size for the server's outputs
Not perfect but better than a hardcoded physical size.
2015-04-02 17:36:38 +02:00
Martin Gräßlin 2b185fa7e0 [wayland] Set internal cursor through WaylandCursorTheme in AbstractBackend
Getting the cursor image from the cursor theme is unfortunately not
straight forward. We have three different libraries and all have
drawbacks:
* XCursor - we just kicked it out
* xcb-util/cursor - only provides xcb_cursor_t, so a dependency on X
* wayland-cursor - only a client side API

The picked solution is using wayland-cursor. It provides the cursor in a
wl_buffer. Unfortunately the client side API does not easily allow to
a) read it back
b) init without a wl_shm_pool

Thus we need to work this around:
* create an internal connection
* get a ShmPool on it
* init WaylandCursorTheme with this ShmPool
* get the cursor wl_buffer from the theme
* trigger a roundtrip
* get the corresponding BufferInterface for the buffer
* set the content as the software cursor
2015-04-02 14:37:23 +02:00
Martin Gräßlin 9a0fd94013 Introduce AbstractBackend as base class for Wayland and X11Windowed backend
The AbstractBackend registers itself in the WaylandServer allowing
external users to easily get to the backend and not needing to test
manually which backend is used.
2015-03-20 14:41:03 +01:00
Martin Gräßlin 79c49e84a4 [kwin_wayland] Pass socket file descriptor to QtWayland
WaylandServer allows to create a ClientConnection which is intended for
QtWayland. This allows us to easily identify our "own" surfaces. The
created file descriptor is set as env variable WAYLAND_SOCKET prior to
creating the Application. Wayland will unset it after connecting, so we
don't need to unset it. This removes the hack of setting and resetting
the WAYLAND_DISPLAY environment variable.
2015-03-17 10:20:19 +01:00
Martin Gräßlin 69a13a779d [kwin_wayland] Start Xwayland through socket file descriptor
Creates a socketpair in WaylandServer and creates a ClientConnection for
Xwayland. The created file descriptor is passed to Xwayland through the
WAYLAND_SOCKET env variable.
2015-03-17 10:20:19 +01:00
Martin Gräßlin 54c2c5db2d [wayland] Create SeatInterface and sync with WaylandBackend's seat
If not using libinput we get the seat information from the lower
level Wayland server: let's forward the information to our own
SeatInterface.
2015-03-17 10:20:19 +01:00
Martin Gräßlin dc0f040185 [kwin_wayland] Init Outputs from screen information
Removes the hack for startup. Still needs proper physical size.
2015-03-17 10:20:19 +01:00
Martin Gräßlin 07c972b6d4 [wayland] Add a SurfaceInterface to Toplevel
Adds the SurfaceInterface identified by the surface id we get from
Xwayland. This allows in an easier way to map a Toplevel to a
Wayland surface and will also be useful for Wayland clients.
2015-03-17 10:08:27 +01:00
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.
2015-03-17 10:08:27 +01:00