Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11wm.c @ 3998:098ac044cd2f SDL-1.2
Fixed bug #447
Xlib uses the native locale, not latin1
... the question is... what does the server use? :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 04 Jul 2007 07:54:06 +0000 |
parents | 1a327643e741 |
children | a1b03ba2fcd0 |
comparison
equal
deleted
inserted
replaced
3997:6a4f3a32c2e6 | 3998:098ac044cd2f |
---|---|
255 _NET_WM_ICON_NAME = XInternAtom(SDL_Display, "_NET_WM_ICON_NAME", False); | 255 _NET_WM_ICON_NAME = XInternAtom(SDL_Display, "_NET_WM_ICON_NAME", False); |
256 } | 256 } |
257 #endif | 257 #endif |
258 | 258 |
259 if ( title != NULL ) { | 259 if ( title != NULL ) { |
260 char *title_latin1 = SDL_iconv_utf8_latin1((char *)title); | 260 char *title_locale = SDL_iconv_utf8_locale(title); |
261 if ( !title_latin1 ) { | 261 if ( !title_locale ) { |
262 SDL_OutOfMemory(); | 262 SDL_OutOfMemory(); |
263 return; | 263 return; |
264 } | 264 } |
265 status = XStringListToTextProperty(&title_latin1, 1, &titleprop); | 265 status = XStringListToTextProperty(&title_locale, 1, &titleprop); |
266 SDL_free(title_latin1); | 266 SDL_free(title_locale); |
267 if ( status ) { | 267 if ( status ) { |
268 XSetTextProperty(SDL_Display, WMwindow, &titleprop, XA_WM_NAME); | 268 XSetTextProperty(SDL_Display, WMwindow, &titleprop, XA_WM_NAME); |
269 XFree(titleprop.value); | 269 XFree(titleprop.value); |
270 } | 270 } |
271 #ifdef X_HAVE_UTF8_STRING | 271 #ifdef X_HAVE_UTF8_STRING |
278 } | 278 } |
279 } | 279 } |
280 #endif | 280 #endif |
281 } | 281 } |
282 if ( icon != NULL ) { | 282 if ( icon != NULL ) { |
283 char *icon_latin1 = SDL_iconv_utf8_latin1((char *)icon); | 283 char *icon_locale = SDL_iconv_utf8_locale(icon); |
284 if ( !icon_latin1 ) { | 284 if ( !icon_locale ) { |
285 SDL_OutOfMemory(); | 285 SDL_OutOfMemory(); |
286 return; | 286 return; |
287 } | 287 } |
288 status = XStringListToTextProperty(&icon_latin1, 1, &iconprop); | 288 status = XStringListToTextProperty(&icon_locale, 1, &iconprop); |
289 SDL_free(icon_latin1); | 289 SDL_free(icon_locale); |
290 if ( status ) { | 290 if ( status ) { |
291 XSetTextProperty(SDL_Display, WMwindow, &iconprop, XA_WM_ICON_NAME); | 291 XSetTextProperty(SDL_Display, WMwindow, &iconprop, XA_WM_ICON_NAME); |
292 XFree(iconprop.value); | 292 XFree(iconprop.value); |
293 } | 293 } |
294 #ifdef X_HAVE_UTF8_STRING | 294 #ifdef X_HAVE_UTF8_STRING |