aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-11 18:25:17 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-11 18:25:17 -0400
commitdb5b76e6fe48fbcf13953fc26c459c1ccdb3fcc2 (patch)
treedf2f30ebc0886e8a650e0c1af68d3c32330f1d97
parentc98c4910383e13a3ca5bd0ef12d5a412984a5803 (diff)
downloadrunes-db5b76e6fe48fbcf13953fc26c459c1ccdb3fcc2.tar.gz
runes-db5b76e6fe48fbcf13953fc26c459c1ccdb3fcc2.zip
move the setlocale call to the window backend
since that's why i'm actually calling it
-rw-r--r--src/runes.c4
-rw-r--r--src/runesd.c4
-rw-r--r--src/window-backend-xlib.c3
3 files changed, 3 insertions, 8 deletions
diff --git a/src/runes.c b/src/runes.c
index 881c5f9..b7ec368 100644
--- a/src/runes.c
+++ b/src/runes.c
@@ -1,5 +1,3 @@
-#include <locale.h>
-
#include "runes.h"
#include "loop.h"
@@ -11,8 +9,6 @@ int main (int argc, char *argv[])
RunesLoop *loop;
RunesWindowBackend *wb;
- setlocale(LC_ALL, "");
-
loop = runes_loop_new();
wb = runes_window_backend_new();
runes_term_register_with_loop(runes_term_new(argc, argv, wb), loop);
diff --git a/src/runesd.c b/src/runesd.c
index 2fa5f6b..6a26d6d 100644
--- a/src/runesd.c
+++ b/src/runesd.c
@@ -1,5 +1,3 @@
-#include <locale.h>
-
#include "runes.h"
#include "loop.h"
@@ -18,8 +16,6 @@ int main (int argc, char *argv[])
runes_die("runesd takes no arguments; pass them to runesc instead.");
}
- setlocale(LC_ALL, "");
-
loop = runes_loop_new();
wb = runes_window_backend_new();
daemon = runes_daemon_new(loop, wb);
diff --git a/src/window-backend-xlib.c b/src/window-backend-xlib.c
index 651437c..aeb9bf1 100644
--- a/src/window-backend-xlib.c
+++ b/src/window-backend-xlib.c
@@ -1,3 +1,4 @@
+#include <locale.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@@ -29,6 +30,8 @@ RunesWindowBackend *runes_window_backend_new()
RunesWindowBackend *wb;
XInitThreads();
+
+ setlocale(LC_ALL, "");
XSetLocaleModifiers("");
wb = calloc(1, sizeof(RunesWindowBackend));