hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
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 3ce5a95d460f263f22cbdf2b2e04ed2631b5d6b2 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 15/40] 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 66a05be..0ce55bb 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"
@@ -353,6 +355,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.17.1