diff options
author | Egbert Eich <eich@freedesktop.org> | 2004-04-23 18:42:09 +0000 |
---|---|---|
committer | Egbert Eich <eich@freedesktop.org> | 2004-04-23 18:42:09 +0000 |
commit | c6349f43193b74a3c09945f3093a871b0157ba47 (patch) | |
tree | aea173c19da6fa57e24eb4633ff815feb7ae3fa0 /src/WMProps.c | |
parent | c3c4ddc682950a01b80825021f3e2503ab01ea7f (diff) | |
download | xorg-lib-libX11-c6349f43193b74a3c09945f3093a871b0157ba47.tar.gz |
Merging XORG-CURRENT into trunk
Diffstat (limited to 'src/WMProps.c')
-rw-r--r-- | src/WMProps.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/WMProps.c b/src/WMProps.c index c1ed9a9d..6e4e474c 100644 --- a/src/WMProps.c +++ b/src/WMProps.c @@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/lib/X11/WMProps.c,v 3.6 2001/12/14 19:54:07 dawes Exp $ */ /*********************************************************** Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., @@ -55,10 +56,8 @@ SOFTWARE. #include <X11/Xatom.h> #include <X11/Xutil.h> #include <X11/Xos.h> +#include <X11/Xlocale.h> -#ifdef X_NOT_STDC_ENV -extern char *getenv(); -#endif /* * XSetWMProperties sets the following properties: @@ -86,6 +85,7 @@ void XSetWMProperties (dpy, w, windowName, iconName, argv, argc, sizeHints, XTextProperty textprop; char hostName[256]; int len = _XGetHostname (hostName, sizeof hostName); + char *locale; /* set names of window and icon */ if (windowName) XSetWMName (dpy, w, windowName); @@ -121,6 +121,14 @@ void XSetWMProperties (dpy, w, windowName, iconName, argv, argc, sizeHints, * systems will have to change this. */ char *cp = strrchr (argv[0], '/'); +#ifdef __UNIXOS2__ + char *os2_cp = strrchr (argv[0],'\\'); + char *dot_cp = strrchr (argv[0],'.'); + if (os2_cp && (os2_cp > cp)) { + if(dot_cp && (dot_cp > os2_cp)) *dot_cp = '\0'; + cp=os2_cp; + } +#endif tmp.res_name = (cp ? cp + 1 : argv[0]); } tmp.res_class = classHints->res_class; @@ -128,5 +136,11 @@ void XSetWMProperties (dpy, w, windowName, iconName, argv, argc, sizeHints, } XSetClassHint (dpy, w, classHints); } + + locale = setlocale(LC_CTYPE, (char *)NULL); + if (locale) + XChangeProperty (dpy, w, XInternAtom(dpy, "WM_LOCALE_NAME", False), + XA_STRING, 8, PropModeReplace, + (unsigned char *)locale, strlen(locale)); } |