From 797e93631163a895459fbc3a86243c639f082c76 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 2 Feb 2012 17:01:11 +0100 Subject: [PATCH] Replaced XStoreName and XSetIconName with X*SetWMProperties. --- src/x11_window.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index d3c950c9..606512b9 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1512,9 +1512,21 @@ void _glfwPlatformCloseWindow(_GLFWwindow* window) void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) { - // Set window & icon title - XStoreName(_glfwLibrary.X11.display, window->X11.handle, title); - XSetIconName(_glfwLibrary.X11.display, window->X11.handle, title); +#if defined(X_HAVE_UTF8_STRING) + Xutf8SetWMProperties(_glfwLibrary.X11.display, + window->X11.handle, + title, title, + NULL, 0, + NULL, NULL, NULL); +#else + // This may be a slightly better fallback than using XStoreName and + // XSetIconName, which always store their arguments using STRING + XmbSetWMProperties(_glfwLibrary.X11.display, + window->X11.handle, + title, title, + NULL, 0, + NULL, NULL, NULL); +#endif if (window->X11.wmName != None) {