weston/xwayland
Tyler Veness cf4c13af98 xwayland: set surface_id to 0 when client resource is found
When Xwayland requests that a wl_surface be created and the X event is
handled before the wayland requests, a surface ID is stored to
window->surface_id and the window is added to the unpaired window list. When
weston_wm_create_surface is called, the window is removed from the list and
window->surface_id is set to zero. If window->surface_id is not zero when
weston_wm_window_destroy is called, the window is assumed to be in the
unpaired window list and wl_list_remove is called. If
weston_wm_window_handle_surface_id is called and the surface has already
been created, the window is not added to the unpaired window list, but
window->surface_id isn't set to zero. When the window is destroyed, removing
the window from the list is attempted anyway and a crash occurs.

This patch stores the surface ID in a temporary variable and only assigns it
to window->surface_id when the window is added to the unpaired window list.
Otherwise window->surface_id is set to zero to maintain its use as a flag
variable.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=80273
Signed-off-by: Tyler Veness <calcmogul@gmail.com>
2014-07-24 13:13:55 -07:00
..
dnd.c Don't include xserver-server-protocol.h 2014-04-07 09:46:27 -07:00
hash.c Move xwayland up one directory level 2013-12-04 10:20:02 -08:00
hash.h Move xwayland up one directory level 2013-12-04 10:20:02 -08:00
launcher.c Better error message when exec'ing Xwayland fails 2014-06-25 15:52:35 +03:00
selection.c Move xwayland up one directory level 2013-12-04 10:20:02 -08:00
window-manager.c xwayland: set surface_id to 0 when client resource is found 2014-07-24 13:13:55 -07:00
xwayland.h xwayland: Use new Xwayland DDX 2014-04-06 22:32:24 -07:00