[mutter/wip/carlosg/move-pointer-onscreen: 4/7] test/utils: Make (WAYLAND_)DISPLAY passing to client optional
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/move-pointer-onscreen: 4/7] test/utils: Make (WAYLAND_)DISPLAY passing to client optional
- Date: Fri, 14 Jan 2022 21:38:33 +0000 (UTC)
commit 0d5322663068e254d215b83719e869c29a4ae9fc
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Jan 14 22:07:42 2022 +0100
test/utils: Make (WAYLAND_)DISPLAY passing to client optional
src/tests/meta-test-utils.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/src/tests/meta-test-utils.c b/src/tests/meta-test-utils.c
index 5f457cb3bc..0b400b175a 100644
--- a/src/tests/meta-test-utils.c
+++ b/src/tests/meta-test-utils.c
@@ -477,12 +477,19 @@ meta_test_client_new (MetaContext *context,
wayland_display_name = meta_wayland_get_wayland_display_name (compositor);
x11_display_name = meta_wayland_get_public_xwayland_display_name (compositor);
- g_subprocess_launcher_setenv (launcher,
- "WAYLAND_DISPLAY", wayland_display_name,
- TRUE);
- g_subprocess_launcher_setenv (launcher,
- "DISPLAY", x11_display_name,
- TRUE);
+ if (wayland_display_name)
+ {
+ g_subprocess_launcher_setenv (launcher,
+ "WAYLAND_DISPLAY", wayland_display_name,
+ TRUE);
+ }
+
+ if (x11_display_name)
+ {
+ g_subprocess_launcher_setenv (launcher,
+ "DISPLAY", x11_display_name,
+ TRUE);
+ }
subprocess = g_subprocess_launcher_spawn (launcher,
error,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]