1From 4c27748d13263756aaf2fb3efaab723e6ce993f8 Mon Sep 17 00:00:00 2001
2From: Jeffy Chen <jeffy.chen@rock-chips.com>
3Date: Mon, 15 Jun 2020 10:01:54 +0800
4Subject: [PATCH 06/33] waylandsink: Support place below/above
5
6Set environment WAYLANDSINK_PLACE_ABOVE=1 to place it above parent.
7
8Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
9---
10 ext/wayland/wlwindow.c | 7 +++++++
11 1 file changed, 7 insertions(+)
12
13diff --git a/ext/wayland/wlwindow.c b/ext/wayland/wlwindow.c
14index 66df0fc..57b5491 100644
15--- a/ext/wayland/wlwindow.c
16+++ b/ext/wayland/wlwindow.c
17@@ -24,6 +24,8 @@
18 #include <config.h>
19 #endif
20
21+#include <stdlib.h>
22+
23 #include "wlwindow.h"
24 #include "wlshmallocator.h"
25 #include "wlbuffer.h"
26@@ -357,6 +359,11 @@ gst_wl_window_new_in_surface (GstWlDisplay * display,
27       window->area_surface, parent);
28   wl_subsurface_set_desync (window->area_subsurface);
29
30+  if (g_getenv ("WAYLANDSINK_PLACE_ABOVE"))
31+    wl_subsurface_place_above (window->area_subsurface, parent);
32+  else
33+    wl_subsurface_place_below (window->area_subsurface, parent);
34+
35   wl_surface_commit (parent);
36
37   return window;
38--
392.20.1
40
41