From be690321c42f5234bee0aa47fd4c3e5497124ee5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20=C3=85strand?= Date: Thu, 15 Jan 2009 13:26:01 +0000 Subject: [PATCH] When updating X11 window title, update WM_ICON_NAME and WM_CLASS as 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unix/tx/TXWindow.cxx b/unix/tx/TXWindow.cxx index 4bab2d9b..2b535df8 100644 --- a/unix/tx/TXWindow.cxx +++ b/unix/tx/TXWindow.cxx @@ -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) -- 2.39.5