Move X locale support to "src/dwm.c"
This commit is contained in:
parent
01610d88d7
commit
324d6c374b
3 changed files with 5 additions and 9 deletions
|
@ -279,6 +279,10 @@ static void (*handler[LASTEvent])(XEvent*) = {
|
|||
|
||||
int dwm_main()
|
||||
{
|
||||
if (!XSupportsLocale()) {
|
||||
warning("no locale support in X");
|
||||
}
|
||||
|
||||
if (!(dpy = XOpenDisplay(NULL))) {
|
||||
fatal("cannot open display");
|
||||
}
|
||||
|
@ -297,11 +301,6 @@ int dwm_main()
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
bool dwm_has_locale_support()
|
||||
{
|
||||
return XSupportsLocale();
|
||||
}
|
||||
|
||||
/************************************
|
||||
* Private function implementations *
|
||||
************************************/
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#ifndef _DWM_H
|
||||
#define _DWM_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
int dwm_main();
|
||||
bool dwm_has_locale_support();
|
||||
|
||||
#endif // _DWM_H
|
||||
|
|
|
@ -37,7 +37,7 @@ int main(int argc, char *argv[])
|
|||
fatal("no program executable name");
|
||||
}
|
||||
|
||||
if (!setlocale(LC_CTYPE, "") || !dwm_has_locale_support()) {
|
||||
if (!setlocale(LC_CTYPE, "")) {
|
||||
warning("no locale support");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue