diff --git a/panda/src/x11display/x11GraphicsPipe.cxx b/panda/src/x11display/x11GraphicsPipe.cxx index 42327d4582..c5e24e10bf 100644 --- a/panda/src/x11display/x11GraphicsPipe.cxx +++ b/panda/src/x11display/x11GraphicsPipe.cxx @@ -340,6 +340,7 @@ x11GraphicsPipe(const std::string &display) : // Get some X atom numbers. _wm_delete_window = XInternAtom(_display, "WM_DELETE_WINDOW", false); + _net_wm_name = XInternAtom(_display, "_NET_WM_NAME", false); _net_wm_pid = XInternAtom(_display, "_NET_WM_PID", false); _net_wm_window_type = XInternAtom(_display, "_NET_WM_WINDOW_TYPE", false); _net_wm_window_type_splash = XInternAtom(_display, "_NET_WM_WINDOW_TYPE_SPLASH", false); diff --git a/panda/src/x11display/x11GraphicsPipe.h b/panda/src/x11display/x11GraphicsPipe.h index e1abf80b00..c457332f9e 100644 --- a/panda/src/x11display/x11GraphicsPipe.h +++ b/panda/src/x11display/x11GraphicsPipe.h @@ -125,6 +125,7 @@ public: public: // Atom specifications. Atom _wm_delete_window; + Atom _net_wm_name; Atom _net_wm_pid; Atom _net_wm_window_type; Atom _net_wm_window_type_splash; diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 7e03bb73c5..531a100e59 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -1188,6 +1188,15 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) { if (XStringListToTextProperty((char **)&name, 1, &window_name) != 0) { window_name_p = &window_name; } + +#ifdef X_HAVE_UTF8_STRING + XTextProperty wm_name; + if (Xutf8TextListToTextProperty(_display, (char **)&name, 1, + XUTF8StringStyle, &wm_name) == Success) { + XSetTextProperty(_display, _xwindow, &wm_name, x11_pipe->_net_wm_name); + XFree(wm_name.value); + } +#endif } // The size hints request a window of a particular size andor a particular