1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00

Don't talk to i3 if i3-mode is 0

This commit is contained in:
QC 2014-01-26 15:47:17 +01:00
parent 07072de251
commit 4efeb421f2

View file

@ -73,6 +73,10 @@ static void exec_mark(const char *mark)
{ {
int s, t, len; int s, t, len;
struct sockaddr_un remote; 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 ) { 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 ); 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; unsigned int retv_index = 0;
char **retv = NULL; char **retv = NULL;
if(config.i3_mode == 0) {
fprintf(stderr, "Cannot use marks without i3 running\n");
return retv;
}
#ifdef TIMING #ifdef TIMING
struct timespec start, stop; struct timespec start, stop;
clock_gettime( CLOCK_REALTIME, &start ); clock_gettime( CLOCK_REALTIME, &start );