mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Add IPC security policy command handlers
This commit is contained in:
parent
e9e1a6a409
commit
c8dc4925d1
4 changed files with 200 additions and 1 deletions
|
|
@ -641,6 +641,22 @@ bool read_config(FILE *file, struct sway_config *config) {
|
|||
}
|
||||
break;
|
||||
|
||||
case CMD_BLOCK_IPC:
|
||||
if (block == CMD_BLOCK_END) {
|
||||
block = CMD_BLOCK_IPC;
|
||||
} else {
|
||||
sway_log(L_ERROR, "Invalid block '%s'", line);
|
||||
}
|
||||
break;
|
||||
|
||||
case CMD_BLOCK_IPC_EVENTS:
|
||||
if (block == CMD_BLOCK_IPC) {
|
||||
block = CMD_BLOCK_IPC_EVENTS;
|
||||
} else {
|
||||
sway_log(L_ERROR, "Invalid block '%s'", line);
|
||||
}
|
||||
break;
|
||||
|
||||
case CMD_BLOCK_END:
|
||||
switch(block) {
|
||||
case CMD_BLOCK_MODE:
|
||||
|
|
@ -671,6 +687,16 @@ bool read_config(FILE *file, struct sway_config *config) {
|
|||
block = CMD_BLOCK_END;
|
||||
break;
|
||||
|
||||
case CMD_BLOCK_IPC:
|
||||
sway_log(L_DEBUG, "End of IPC block");
|
||||
block = CMD_BLOCK_END;
|
||||
break;
|
||||
|
||||
case CMD_BLOCK_IPC_EVENTS:
|
||||
sway_log(L_DEBUG, "End of IPC events block");
|
||||
block = CMD_BLOCK_IPC;
|
||||
break;
|
||||
|
||||
case CMD_BLOCK_END:
|
||||
sway_log(L_ERROR, "Unmatched }");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue