eb3cf22018
If a client does this: 1. create a main window and map it 2. create a wl_surface, and make it a sub-surface of the main window 3. set the sub-surface to desync 4. commit content to the sub-surface to map it Then step 4 should cause the sub-surface to become mapped. However, Weston fails to schedule a repaint in that case, so the sub-surface will not appear until something else causes a repaint on that output, e.g. the main window. A quick and dirty fix is to set the output mask for the surface in Weston, which allows the repaint to be scheduled. This patch implements that, and might only work right on single-output systems. A proper fix would involve rewriting the whole "is surface mapped" mechanism in Weston, to not rely on output assignments but to have a separate flag for "mapped", and figuring out how to schedule repaints for the right outputs. Following is the actual protocol sequence used to trigger the problem: [3224648.125] -> wl_compositor@4.create_surface(new id wl_surface@3) [3224648.206] -> xdg_shell@7.get_xdg_surface(new id xdg_surface@8, wl_surface@3) [3224648.311] -> xdg_surface@8.set_title("simple-shm") [3224648.378] -> wl_surface@3.damage(0, 0, 250, 250) [3224649.888] -> wl_shm@6.create_pool(new id wl_shm_pool@9, fd 6, 250000) [3224650.031] -> wl_shm_pool@9.create_buffer(new id wl_buffer@10, 0, 250, 250, 1000, 1) [3224650.244] -> wl_shm_pool@9.destroy() [3224651.975] -> wl_surface@3.attach(wl_buffer@10, 0, 0) [3224652.100] -> wl_surface@3.damage(20, 20, 210, 210) [3224652.243] -> wl_surface@3.frame(new id wl_callback@11) [3224652.317] -> wl_surface@3.commit() [3228652.535] -> wl_compositor@4.create_surface(new id wl_surface@12) [3228652.610] -> wl_subcompositor@5.get_subsurface(new id wl_subsurface@13, wl_surface@12, wl_surface@3) [3228652.644] -> wl_subsurface@13.set_desync() [3228652.659] -> wl_subsurface@13.set_position(100, 100) [3228654.090] -> wl_shm@6.create_pool(new id wl_shm_pool@14, fd 6, 250000) [3228654.140] -> wl_shm_pool@14.create_buffer(new id wl_buffer@15, 0, 250, 250, 1000, 1) [3228654.180] -> wl_shm_pool@14.destroy() [3228654.408] -> wl_surface@12.attach(wl_buffer@15, 0, 0) [3228654.436] -> wl_surface@12.damage(0, 0, 250, 250) [3228654.462] -> wl_surface@12.commit() Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Cc: George Kiagiadakis <george.kiagiadakis@collabora.com> Cc: Jason Ekstrand <jason.ekstrand@intel.com> |
||
---|---|---|
clients | ||
data | ||
desktop-shell | ||
fullscreen-shell | ||
m4 | ||
man | ||
protocol | ||
shared | ||
src | ||
tests | ||
wcap | ||
xwayland | ||
.gitignore | ||
autogen.sh | ||
configure.ac | ||
COPYING | ||
Makefile.am | ||
notes.txt | ||
README | ||
releasing.txt | ||
weston.ini.in |
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 building weston and its dependencies. The test suite can be invoked via `make check`; see http://wayland.freedesktop.org/testing.html for additional details.