comparison src/video/x11/SDL_x11wm.c @ 913:a7a8c282d62e

Date: Mon, 28 Jun 2004 23:15:55 +0200 From: Ivo Danihelka Subject: [SDL] [PATCH] SDL_WM_SetCaption with UTF-8 This patch enables UTF-8 suport for SDL_WM_SetCaption() in x11. XFree86 >= 4.0.2 supports text strings in UTF-8. Presence of this feature is indicated by the macro X_HAVE_UTF8_STRING.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 25 Jul 2004 17:33:33 +0000
parents b8d311d90021
children 3acd16ea0180
comparison
equal deleted inserted replaced
912:bc0b95b02235 913:a7a8c282d62e
253 253
254 /* Lock the event thread, in multi-threading environments */ 254 /* Lock the event thread, in multi-threading environments */
255 SDL_Lock_EventThread(); 255 SDL_Lock_EventThread();
256 256
257 if ( title != NULL ) { 257 if ( title != NULL ) {
258 #ifdef X_HAVE_UTF8_STRING
259 Xutf8TextListToTextProperty(SDL_Display, (char **)&title, 1,
260 XUTF8StringStyle, &titleprop);
261 #else
258 XStringListToTextProperty((char **)&title, 1, &titleprop); 262 XStringListToTextProperty((char **)&title, 1, &titleprop);
263 #endif
259 XSetWMName(SDL_Display, WMwindow, &titleprop); 264 XSetWMName(SDL_Display, WMwindow, &titleprop);
260 XFree(titleprop.value); 265 XFree(titleprop.value);
261 } 266 }
262 if ( icon != NULL ) { 267 if ( icon != NULL ) {
268 #ifdef X_HAVE_UTF8_STRING
269 Xutf8TextListToTextProperty(SDL_Display, (char **)&icon, 1,
270 XUTF8StringStyle, &iconprop);
271 #else
263 XStringListToTextProperty((char **)&icon, 1, &iconprop); 272 XStringListToTextProperty((char **)&icon, 1, &iconprop);
273 #endif
264 XSetWMIconName(SDL_Display, WMwindow, &iconprop); 274 XSetWMIconName(SDL_Display, WMwindow, &iconprop);
265 XFree(iconprop.value); 275 XFree(iconprop.value);
266 } 276 }
267 XSync(SDL_Display, False); 277 XSync(SDL_Display, False);
268 278