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