]> git.sur5r.net Git - i3/i3/blobdiff - i3-input/main.c
Merge branch 'release-4.16.1'
[i3/i3] / i3-input / main.c
index 785a133fc10e7de57b307821b1c3302ee0c2069b..d1a2efd7cab6b485b4652542e2f4d9459fa237b1 100644 (file)
@@ -41,7 +41,6 @@
  * the command will be sent to i3 */
 static char *format;
 
-static char *socket_path;
 static int sockfd;
 static xcb_key_symbols_t *symbols;
 static bool modeswitch_active = false;
@@ -157,7 +156,7 @@ static int handle_key_release(void *ignored, xcb_connection_t *conn, xcb_key_rel
     return 1;
 }
 
-static void finish_input() {
+static void finish_input(void) {
     char *command = (char *)concat_strings(glyphs_utf8, input_position);
 
     /* count the occurrences of %s in the string */
@@ -374,7 +373,7 @@ free_resources:
 
 int main(int argc, char *argv[]) {
     format = sstrdup("%s");
-    socket_path = getenv("I3SOCK");
+    char *socket_path = NULL;
     char *pattern = sstrdup("pango:monospace 8");
     int o, option_index = 0;
 
@@ -438,12 +437,6 @@ int main(int argc, char *argv[]) {
     if (!conn || xcb_connection_has_error(conn))
         die("Cannot open display\n");
 
-    if (socket_path == NULL)
-        socket_path = root_atom_contents("I3_SOCKET_PATH", conn, screen);
-
-    if (socket_path == NULL)
-        socket_path = "/tmp/i3-ipc.sock";
-
     sockfd = ipc_connect(socket_path);
 
     root_screen = xcb_aux_get_screen(conn, screen);