### Wayland ###
libwl_shell_surface_plugin_la_SOURCES = wl/shell_surface.c
libwl_shell_surface_plugin_la_CFLAGS = $(WAYLAND_CLIENT_CFLAGS)
-libwl_shell_surface_plugin_la_LIBADD = $(WAYLAND_CLIENT_LIBS)
+libwl_shell_surface_plugin_la_LIBADD = $(WAYLAND_CLIENT_LIBS) $(LIBPTHREAD)
if HAVE_WAYLAND
vout_LTLIBRARIES += libwl_shell_surface_plugin.la
endif
vlc_thread_t thread;
};
+static void cleanup_wl_display_read(void *data)
+{
+ struct wl_display *display = data;
+
+ wl_display_cancel_read(display);
+}
+
/** Background thread for Wayland shell events handling */
static void *Thread(void *data)
{
struct pollfd ufd[1];
int canc = vlc_savecancel();
+ vlc_cleanup_push(cleanup_wl_display_read, display);
ufd[0].fd = wl_display_get_fd(display);
ufd[0].events = POLLIN;
wl_display_dispatch_pending(display);
}
assert(0);
+ vlc_cleanup_pop();
//vlc_restorecancel(canc);
//return NULL;
}