]> git.sur5r.net Git - i3/i3/blobdiff - i3-config-wizard/main.c
Merge branch 'master' into next
[i3/i3] / i3-config-wizard / main.c
index 84a7f77ee22f3f76b688c89aed0e8d0c7cfa9a1b..63ebbfa5f05ee54a4222e7a87f193e82db8383af 100644 (file)
@@ -2,7 +2,7 @@
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
  *
  * i3-config-wizard: Program to convert configs using keycodes to configs using
  *                   keysyms.
@@ -155,8 +155,8 @@ static int handle_expose() {
         set_font(&bold_font);
         set_font_colors(pixmap_gc, get_colorpixel("#FFFFFF"), get_colorpixel("#000000"));
         if (modifier == MOD_Mod4)
-            txt(31, 4, "<Win>");
-        else txt(31, 5, "<Alt>");
+            txt(10, 4, "-> <Win>");
+        else txt(10, 5, "-> <Alt>");
 
         /* green */
         set_font(&font);
@@ -285,7 +285,7 @@ static void finish() {
 
     char *line = NULL;
     size_t len = 0;
-#if !defined(__APPLE__)
+#if !defined(__APPLE__) && (!defined(__FreeBSD__) || __FreeBSD_version >= 800000)
     ssize_t read;
 #endif
     bool head_of_file = true;
@@ -298,7 +298,7 @@ static void finish() {
     fputs("# this file and re-run i3-config-wizard(1).\n", ks_config);
     fputs("#\n", ks_config);
 
-#if defined(__APPLE__)
+#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 800000)
     while ((line = fgetln(kc_config, &len)) != NULL) {
 #else
     while ((read = getline(&line, &len, kc_config)) != -1) {
@@ -410,7 +410,7 @@ int main(int argc, char *argv[]) {
     unlink(config_path);
 
     if (socket_path == NULL)
-        socket_path = socket_path_from_x11();
+        socket_path = root_atom_contents("I3_SOCKET_PATH");
 
     if (socket_path == NULL)
         socket_path = "/tmp/i3-ipc.sock";