From 4efeb421f2f73939bbc3ccc7b13f4d9a86b538c0 Mon Sep 17 00:00:00 2001 From: QC Date: Sun, 26 Jan 2014 15:47:17 +0100 Subject: [PATCH] Don't talk to i3 if i3-mode is 0 --- source/mark-dialog.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/mark-dialog.c b/source/mark-dialog.c index 773f2e23..e2591460 100644 --- a/source/mark-dialog.c +++ b/source/mark-dialog.c @@ -73,6 +73,10 @@ static void exec_mark(const char *mark) { int s, t, len; struct sockaddr_un remote; + if(config.i3_mode == 0) { + fprintf(stderr, "Cannot use marks without i3 running\n"); + return ; + } if ( strlen( i3_socket_path ) > UNIX_PATH_MAX ) { fprintf( stderr, "Socket path is to long. %zd > %d\n", strlen( i3_socket_path ), UNIX_PATH_MAX ); @@ -130,6 +134,10 @@ static char ** get_mark ( ) { unsigned int retv_index = 0; char **retv = NULL; + if(config.i3_mode == 0) { + fprintf(stderr, "Cannot use marks without i3 running\n"); + return retv; + } #ifdef TIMING struct timespec start, stop; clock_gettime( CLOCK_REALTIME, &start );