Commit graph

11 commits

Author SHA1 Message Date
Martin Gräßlin
57905c0cc2 And we got rid of KDebug
Usages of kBacktrace got dropped.
2013-09-02 13:14:39 +02:00
Martin Gräßlin
cc66b75609 Fix unitialized variable 2013-06-24 12:42:12 +02:00
Martin Gräßlin
1664a143ab Mark Wayland backend as an experimental backend
Users might try it and play with it, but we don't want any bug reports.

REVIEW: 110689
BUG: 319996
FIXED-IN: 4.11
2013-06-05 13:46:31 +02:00
Martin Gräßlin
9d3404b090 Map the Wayland compositing surface as fullscreen
Now it's just like X11, isn't it ;-)
2013-06-05 13:46:01 +02:00
Martin Gräßlin
448f16220c Use a QSocketNotifier to wait for Wayland events
Nicely integrates Qt's event loop with the Wayland event handling.
We still need to dispatch pending events before calling eglSwapBuffers as
that call might block.
2013-06-05 13:46:01 +02:00
Martin Gräßlin
01fa261537 Install cursor again after a ping event
Weston switches to the waiting cursor and does not reset, so we need to
ensure that the correct cursor is used once we sent the pong.
2013-06-05 13:46:01 +02:00
Martin Gräßlin
40cb4f5cd6 Map cursors from X11 to Wayland
Tracking cursor changes in X11. Whenever the cursor image changes, the
image is read and a wl_buffer is created with the content of the X11
cursor. This buffer is attached to a surface used as a cursor image.

As a memory pool for the cursor buffers a temporary file is created and
mmapped.

All created cursors are cached but not yet removed from the cache. Some
cleanup code would be useful also to ensure that our shared memory pool
doesn't overflow.
2013-06-05 13:46:01 +02:00
Martin Gräßlin
cef62541ce Support mouse wheel events
Emitting button/press release events on buttons 4 to 7 to emulate the
vertical and horizontal scrolling.
2013-06-05 13:46:00 +02:00
Martin Gräßlin
5d3aa8e7cf Mark Wayland surface as opaque 2013-06-05 13:46:00 +02:00
Martin Gräßlin
b6990078ec Add support for Wayland seat: keyboard and pointer
Rudimentary support for input events. Events from Wayland are forwarded
to X's root window using the XTest extension.

Currently supported:
* left/middle/right mouse button
* keyboard events

Not supported:
* additional mouse buttons
* mouse wheel
* touch events

Obviously this is a rather huge hack and is only intended till we have
XWayland support and proper input redirection inside KWin.
2013-06-05 13:46:00 +02:00
Martin Gräßlin
bab5f16d3c Egl Backend using a Wayland surface for rendering
This backend is able to composite on a Wayland surface instead of an X11
overlay window. It can be considered as a prototype for a Wayland session
compositor.

For texture from X11 pixmap the backend uses XShm. This is far from
optimal, but the KHR_image_pixmap extension is not available in Mesa's
Wayland backend. It's a temporary solution till we have XWayland and
texture from Wayland buffer.

To use this backend one needs to specify the environment variable
KWIN_OPENGL_INTERFACE with "egl_wayland". In future KWin should probably
use this backend if the Wayland display env variable is defined.

To use this setup:
1. Have a normal X-Server running on e.g. VT7
2. Start Weston on VT1
3. Start a terminal on Weston
4. start KWin with:

DISPLAY=:0 KWIN_OPENGL_INTERFACE=egl_wayland kwin --replace &

This should map a Wayland surface to Weston showing the content of the X
setup. At the moment it's not yet possible to interact with the surface
as input events are not yet recieved in the backend.

There are still a lot of limitations as documented in the code.
2013-06-05 13:45:45 +02:00