Go to file
Pekka Paalanen e9297f8e7e window: prevent EGL sub-surface deadlock
Mesa's eglSwapBuffers() waits for the frame event from the previous
swapBuffers, before it returns. Apparently eglSwapInterval(), which
should be able to disable the wait, is unimplemented for now.

When a sub-surface contains an EGL widget, and the commit mode is
synchronized, the frame events will not be delivered to EGL until the
parent surface gets committed. Therefore rendering the EGL widget twice
would lead to a deadlock.

When the window is being resized, we need to force a repaint of the EGL
widget, too, to make the whole window consistent. For that, we need to
make sure the frame event from the previous eglSwapBuffers() actually
arrives.

This patch adds an extra wl_surface.commit(parent), when the window is
being resized, which should guarantee, that the previous eglSwapBuffers
gets its event.

To properly handle an EGL widget in a sub-surface, running in its own
thread, the EGL widget's automatic updates should be paused before
sending the extra wl_surface.commit(parent). A natural place for the
pause would be in the widget's resize hook. However, wl_surface.commit
cannot be called right after resize hooks, because it would commit new,
incomplete surface state. Therefore this patch is not enough for
threaded toytoolkit applications.  Luckily those do not exist yet.

When eglSwapInterval() gets implemented, this patch should be reverted.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:35:54 -04:00
clients window: prevent EGL sub-surface deadlock 2013-05-10 14:35:54 -04:00
data window.c: frame_button: Maximize, minimize, close, icon buttons in window frame 2012-05-10 16:19:33 -04:00
man weston.ini: document background-type 2013-05-01 13:40:50 -04:00
protocol protocol: add sub-surfaces 2013-05-10 14:05:59 -04:00
shared Fix compiler warnings 2013-04-03 20:40:44 -04:00
src shell: account for the subsurfaces when going fullscreen or maximizing 2013-05-10 14:35:33 -04:00
tests tests: add sub-surface protocol tests 2013-05-10 14:32:58 -04:00
wcap wcap: Fix typo in usage output. 2012-07-23 14:25:14 -04:00
.gitignore gitignore: Ignore test-driver 2013-03-28 14:04:05 -04:00
autogen.sh Update autotools configuration 2010-11-06 21:04:03 -04:00
configure.ac clients: add subsurfaces demo 2013-05-10 14:35:53 -04:00
COPYING Add COPYING 2012-04-25 10:17:42 -04:00
Makefile.am Makefile.am: Distribute weston.ini sample 2013-02-25 13:04:40 -05:00
notes.txt Add informal notes file 2012-10-25 15:00:42 -04:00
README Flesh out README a bit, link to building instructions 2012-07-20 12:26:23 -04:00
weston.ini Add initial color management framework code 2013-05-10 12:51:08 -04:00

Weston

Weston is the reference implementation of a Wayland compositor, and a
useful compositor in its own right.  Weston has various backends that
lets it run on Linux kernel modesetting and evdev input as well as
under X11.  Weston ships with a few example clients, from simple
clients that demonstrate certain aspects of the protocol to more
complete clients and a simplistic toolkit.  There is also a quite
capable terminal emulator (weston-terminal) and an toy/example desktop
shell.  Finally, weston also provides integration with the Xorg server
and can pull X clients into the Wayland desktop and act as a X window
manager.

Refer to http://wayland.freedesktop.org/building.html for buiding
weston and its dependencies.