Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11wm.c @ 954:3acd16ea0180
Date: Thu, 02 Sep 2004 01:06:23 +0200
From: Ivo Danihelka
Subject: [SDL] [PATCH] Fixed XLocaleNotSupported in utf8 code
there exist X server configurations which does not support locales.
They even does not support conversion from utf-8 textList to utf-8
textProperty.
This patch fixes such situations. It is my bug because I submitted the
previous support for utf-8.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 11 Sep 2004 18:00:41 +0000 |
parents | a7a8c282d62e |
children | 045f186426e1 |
comparison
equal
deleted
inserted
replaced
953:cb5e1d0cad31 | 954:3acd16ea0180 |
---|---|
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 int error = XLocaleNotSupported; | |
258 #ifdef X_HAVE_UTF8_STRING | 259 #ifdef X_HAVE_UTF8_STRING |
259 Xutf8TextListToTextProperty(SDL_Display, (char **)&title, 1, | 260 error = Xutf8TextListToTextProperty(SDL_Display, |
260 XUTF8StringStyle, &titleprop); | 261 (char **)&title, 1, XUTF8StringStyle, |
261 #else | 262 &titleprop); |
262 XStringListToTextProperty((char **)&title, 1, &titleprop); | |
263 #endif | 263 #endif |
264 if ( error != Success ) { | |
265 XStringListToTextProperty((char **)&title, 1, | |
266 &titleprop); | |
267 } | |
264 XSetWMName(SDL_Display, WMwindow, &titleprop); | 268 XSetWMName(SDL_Display, WMwindow, &titleprop); |
265 XFree(titleprop.value); | 269 XFree(titleprop.value); |
266 } | 270 } |
267 if ( icon != NULL ) { | 271 if ( icon != NULL ) { |
272 int error = XLocaleNotSupported; | |
268 #ifdef X_HAVE_UTF8_STRING | 273 #ifdef X_HAVE_UTF8_STRING |
269 Xutf8TextListToTextProperty(SDL_Display, (char **)&icon, 1, | 274 error = Xutf8TextListToTextProperty(SDL_Display, |
270 XUTF8StringStyle, &iconprop); | 275 (char **)&icon, 1, XUTF8StringStyle, &iconprop); |
271 #else | |
272 XStringListToTextProperty((char **)&icon, 1, &iconprop); | |
273 #endif | 276 #endif |
277 if ( error != Success ) { | |
278 XStringListToTextProperty((char **)&icon, 1, &iconprop); | |
279 } | |
274 XSetWMIconName(SDL_Display, WMwindow, &iconprop); | 280 XSetWMIconName(SDL_Display, WMwindow, &iconprop); |
275 XFree(iconprop.value); | 281 XFree(iconprop.value); |
276 } | 282 } |
277 XSync(SDL_Display, False); | 283 XSync(SDL_Display, False); |
278 | 284 |