Add a command line switch to set the name part of WM_CLASS independently

This commit is contained in:
Kovid Goyal
2017-12-01 12:16:13 +05:30
parent 02884c5045
commit 32a6dd2aa1
8 changed files with 58 additions and 31 deletions
+6
View File
@@ -291,3 +291,9 @@ def single_instance(group_id=None):
s.set_inheritable(False)
atexit.register(remove_socket_file, s)
return True
def encode_wm_class(name, cls, title=appname):
if isosx:
return title
return '\x01' + (name or cls) + '\x1e' + cls + '\x1e' + title