]> source.dussan.org Git - tigervnc.git/commitdiff
When updating X11 window title, update WM_ICON_NAME and WM_CLASS as
authorPeter Åstrand <astrand@cendio.se>
Thu, 15 Jan 2009 13:26:01 +0000 (13:26 +0000)
committerPeter Åstrand <astrand@cendio.se>
Thu, 15 Jan 2009 13:26:01 +0000 (13:26 +0000)
well.

Tested in ThinLinc since 2008-01-10.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3550 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/tx/TXWindow.cxx

index 4bab2d9be57701e73174a11ff128d76f3eb99683..2b535df855f7ec1307a53b541de33a99f1dda416 100644 (file)
@@ -288,7 +288,14 @@ void TXWindow::toplevel(const char* name, TXDeleteWindowCallback* dwc_,
 
 void TXWindow::setName(const char* name)
 {
-    XStoreName(dpy, win(), name);
+  XClassHint classHint;
+  XGetClassHint(dpy, win(), &classHint);
+  XFree(classHint.res_name);
+  classHint.res_name = (char*)name;
+  XSetClassHint(dpy, win(), &classHint);
+  XFree(classHint.res_class);
+  XStoreName(dpy, win(), name);
+  XSetIconName(dpy, win(), name);    
 }
 
 void TXWindow::setMaxSize(int w, int h)