From 011691209573d327240c6782722d797aa4e49978 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 10 Apr 2020 16:55:49 +0100 Subject: [PATCH] tests: common: set both WM_NAME and _NET_WM_NAME Signed-off-by: Yuxuan Shui --- tests/testcases/common.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/testcases/common.py b/tests/testcases/common.py index cef5ac3..15d9cbe 100644 --- a/tests/testcases/common.py +++ b/tests/testcases/common.py @@ -5,7 +5,12 @@ import random import string def set_window_name(conn, wid, name): prop_name = "_NET_WM_NAME" - prop_name = conn.core.InternAtom(True, len(prop_name), prop_name).reply().atom + prop_name = conn.core.InternAtom(False, len(prop_name), prop_name).reply().atom + str_type = "UTF8_STRING" + str_type = conn.core.InternAtom(True, len(str_type), str_type).reply().atom + conn.core.ChangePropertyChecked(xproto.PropMode.Replace, wid, prop_name, str_type, 8, len(name), name).check() + prop_name = "WM_NAME" + prop_name = conn.core.InternAtom(False, len(prop_name), prop_name).reply().atom str_type = "STRING" str_type = conn.core.InternAtom(True, len(str_type), str_type).reply().atom conn.core.ChangePropertyChecked(xproto.PropMode.Replace, wid, prop_name, str_type, 8, len(name), name).check()