aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/InitOutput.c16
-rw-r--r--xorg-server/hw/xwin/winclipboard.h1
-rw-r--r--xorg-server/hw/xwin/winclipboardthread.c6
-rw-r--r--xorg-server/hw/xwin/winmultiwindowwm.c13
4 files changed, 12 insertions, 24 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 8d5f4dbfb..8bdb18622 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -35,12 +35,10 @@ from The Open Group.
#include "winmsg.h"
#include "winconfig.h"
#include "winprefs.h"
-#ifdef XWIN_CLIPBOARD
-#include "X11/Xlocale.h"
-#endif
#ifdef DPMSExtension
#include "dpmsproc.h"
#endif
+#include <locale.h>
#ifdef __CYGWIN__
#include <mntent.h>
#endif
@@ -1024,7 +1022,17 @@ InitOutput (ScreenInfo *screenInfo, int argc, char *argv[])
* setlocale applies to all threads in the current process.
* Apply locale specified in LANG environment variable.
*/
- setlocale (LC_ALL, "");
+ if (!setlocale (LC_ALL, ""))
+ {
+ ErrorF ("setlocale failed.\n");
+ }
+
+ /* See if X supports the current locale */
+ if (XSupportsLocale () == FALSE)
+ {
+ ErrorF ("Warning: Locale not supported by X, falling back to 'C' locale.\n");
+ setlocale(LC_ALL, "C");
+ }
}
#endif
diff --git a/xorg-server/hw/xwin/winclipboard.h b/xorg-server/hw/xwin/winclipboard.h
index 95c4050a4..e55f6023d 100644
--- a/xorg-server/hw/xwin/winclipboard.h
+++ b/xorg-server/hw/xwin/winclipboard.h
@@ -55,7 +55,6 @@ typedef int pid_t;
#include <X11/Xatom.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
-#include <X11/Xlocale.h>
/* Windows headers */
#include <X11/Xwindows.h>
diff --git a/xorg-server/hw/xwin/winclipboardthread.c b/xorg-server/hw/xwin/winclipboardthread.c
index 6df6ff380..760ba5eb3 100644
--- a/xorg-server/hw/xwin/winclipboardthread.c
+++ b/xorg-server/hw/xwin/winclipboardthread.c
@@ -121,12 +121,6 @@ winClipboardProc (void *pvNotUsed)
/* Save the Unicode support flag in a global */
g_fUseUnicode = fUseUnicode;
- /* See if X supports the current locale */
- if (XSupportsLocale () == False)
- {
- ErrorF ("winClipboardProc - Warning: Locale not supported by X.\n");
- }
-
/* Create Windows messaging window */
hwnd = winClipboardCreateMessagingWindow ();
diff --git a/xorg-server/hw/xwin/winmultiwindowwm.c b/xorg-server/hw/xwin/winmultiwindowwm.c
index 03951ee8d..da82c0611 100644
--- a/xorg-server/hw/xwin/winmultiwindowwm.c
+++ b/xorg-server/hw/xwin/winmultiwindowwm.c
@@ -51,7 +51,6 @@ typedef int pid_t;
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
-#include <X11/Xlocale.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
@@ -819,12 +818,6 @@ winMultiWindowXMsgProc (void *pArg)
winDebug ("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n");
- /* See if X supports the current locale */
- if (XSupportsLocale () == False)
- {
- ErrorF ("winMultiWindowXMsgProc - Warning: locale not supported by X\n");
- }
-
/* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);
@@ -1229,12 +1222,6 @@ winInitMultiWindowWM (WMInfoPtr pWMInfo, WMProcArgPtr pProcArg)
winDebug ("winInitMultiWindowWM - pthread_mutex_lock () returned.\n");
- /* See if X supports the current locale */
- if (XSupportsLocale () == False)
- {
- ErrorF ("winInitMultiWindowWM - Warning: Locale not supported by X.\n");
- }
-
/* Release the server started mutex */
pthread_mutex_unlock (pProcArg->ppmServerStarted);