Creating shell_surface after creating surface if needed. 19/53519/3 accepted/tizen/mobile/20151208.123917 accepted/tizen/tv/20151208.123933 accepted/tizen/wearable/20151208.123954 submit/tizen/20151207.232239
authorBoram Park <boram1288.park@samsung.com>
Mon, 7 Dec 2015 11:39:53 +0000 (20:39 +0900)
committerBoram Park <boram1288.park@samsung.com>
Mon, 7 Dec 2015 12:35:50 +0000 (21:35 +0900)
   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
waylandsink/src/wlwindow.c

index f782534..af99d8b 100644 (file)
@@ -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];
index b82dcec..6f62fbf 100644 (file)
@@ -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,