From 01eaf8517f9dcd06317881e872b6ed981be998a4 Mon Sep 17 00:00:00 2001 From: Boram Park Date: Mon, 7 Dec 2015 20:39:53 +0900 Subject: [PATCH] Creating shell_surface after creating surface if needed. NOTE: This patch SHOULD be applied for both shm and tbm cases, because enlightenment has different behavior with weston. For enlightenment to guarantee all client requests, shell_surface should be created before sending requests to enlightenment. Change-Id: I34235daee268663d872c515c992eaba985b4b242 --- waylandsink/src/wldisplay.h | 2 ++ waylandsink/src/wlwindow.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/waylandsink/src/wldisplay.h b/waylandsink/src/wldisplay.h index f782534..af99d8b 100644 --- a/waylandsink/src/wldisplay.h +++ b/waylandsink/src/wldisplay.h @@ -76,6 +76,8 @@ struct _GstWlDisplay tbm_bufmgr tbm_bufmgr; tbm_bo tbm_bo; + int need_shell_surface; + gboolean is_native_format; /*SN12, ST12 */ void *bo[NV_BUF_PLANE_NUM]; int plane_size[NV_BUF_PLANE_NUM]; diff --git a/waylandsink/src/wlwindow.c b/waylandsink/src/wlwindow.c index b82dcec..6f62fbf 100644 --- a/waylandsink/src/wlwindow.c +++ b/waylandsink/src/wlwindow.c @@ -127,6 +127,13 @@ gst_wl_window_new_internal (GstWlDisplay * display, struct wl_surface *surface) /* make sure the surface runs on our local queue */ wl_proxy_set_queue ((struct wl_proxy *) surface, display->queue); +#ifdef GST_WLSINK_ENHANCEMENT + /* create shell_surface here for enlightenment */ + if (display->need_shell_surface) + window->shell_surface = wl_shell_get_shell_surface (display->shell, + window->surface); +#endif + window->viewport = wl_scaler_get_viewport (display->scaler, window->surface); /* do not accept input */ @@ -155,8 +162,13 @@ gst_wl_window_new_toplevel (GstWlDisplay * display, GstVideoInfo * video_info) gst_wl_window_set_render_rectangle (window, 0, 0, window->video_width, window->video_height); +#ifdef GST_WLSINK_ENHANCEMENT + /* not create shell_surface here for enlightenment */ + display->need_shell_surface = TRUE; +#else window->shell_surface = wl_shell_get_shell_surface (display->shell, window->surface); +#endif if (window->shell_surface) { wl_shell_surface_add_listener (window->shell_surface, -- 2.7.4