i3bar: Allow child to specify signals to use
We now wait for the child process to send the first line before stopping it to use the signal which might be specified in the i3bar protocol header Since clients might use the same signal for both stop and cont, we also save the stopped state of the child to avoid stopping it while hidden!
This commit is contained in:
committed by
Michael Stapelberg
parent
1e114d7ab5
commit
8210c6be79
@ -10,6 +10,8 @@
|
||||
#ifndef CHILD_H_
|
||||
#define CHILD_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define STDIN_CHUNK_SIZE 1024
|
||||
|
||||
typedef struct {
|
||||
@ -21,6 +23,16 @@ typedef struct {
|
||||
* even an int8_t, but still…
|
||||
*/
|
||||
uint32_t version;
|
||||
|
||||
bool stopped;
|
||||
/**
|
||||
* The signal requested by the client to inform it of the hidden state of i3bar
|
||||
*/
|
||||
int stop_signal;
|
||||
/**
|
||||
* The signal requested by the client to inform it of theun hidden state of i3bar
|
||||
*/
|
||||
int cont_signal;
|
||||
} i3bar_child;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user