From 05c31374f7a0217542fea97ac475d7ced425713c Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 24 May 2019 04:57:26 +0000 Subject: [PATCH] #2298 bytes vs strings, again git-svn-id: https://xpra.org/svn/Xpra/trunk@22777 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/x11/x11_server_base.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/xpra/x11/x11_server_base.py b/src/xpra/x11/x11_server_base.py index 94e2e5e4ef..0c38af6f28 100644 --- a/src/xpra/x11/x11_server_base.py +++ b/src/xpra/x11/x11_server_base.py @@ -284,7 +284,7 @@ def do_update_server_settings(self, settings, reset=False, self._settings.update(settings) for k, v in settings.items(): #cook the "resource-manager" value to add the DPI and/or antialias values: - if k=="resource-manager" and (dpi>0 or antialias or cursor_size>0): + if k==b"resource-manager" and (dpi>0 or antialias or cursor_size>0): value = bytestostr(v) #parse the resources into a dict: values={} @@ -326,12 +326,12 @@ def do_update_server_settings(self, settings, reset=False, for vk, vv in values.items(): value += "%s:\t%s\n" % (vk, vv) #record the actual value used - self._settings["resource-manager"] = value + self._settings[b"resource-manager"] = value v = value.encode("utf-8") #cook xsettings to add various settings: #(as those may not be present in xsettings on some platforms.. like win32 and osx) - if k=="xsettings-blob" and \ + if k==b"xsettings-blob" and \ (self.double_click_time>0 or self.double_click_distance!=(-1, -1) or antialias or dpi>0): from xpra.x11.xsettings_prop import XSettingsTypeInteger, XSettingsTypeString def set_xsettings_value(name, value_type, value): @@ -371,7 +371,9 @@ def root_set(p): from xpra.x11.gtk_x11.prop import prop_set log("server_settings: setting %s to %s", nonl(p), nonl(v)) prop_set(self.root_window, p, "latin1", strtobytes(v).decode("latin1")) - if k == "xsettings-blob": + if k == b"xsettings-blob": self.set_xsettings(v) - elif k == "resource-manager": + elif k == b"resource-manager": root_set("RESOURCE_MANAGER") + else: + log.warn("Warning: unexpected setting '%s'", bytestostr(k))