Implement disabling the workspace buttons („thx“ sECuRE)

This commit is contained in:
Axel Wagner
2011-04-21 20:24:02 +02:00
parent 26993574f5
commit ed5ac7f41d
4 changed files with 29 additions and 8 deletions

View File

@ -121,7 +121,9 @@ void got_workspace_event(char *event) {
void got_output_event(char *event) {
DLOG("Got Output Event!\n");
i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_OUTPUTS, NULL);
i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_WORKSPACES, NULL);
if (!config.disable_ws) {
i3_send_msg(I3_IPC_MESSAGE_TYPE_GET_WORKSPACES, NULL);
}
}
/* Data-structure to easily call the reply-handlers later */
@ -311,5 +313,9 @@ void destroy_connection() {
*
*/
void subscribe_events() {
i3_send_msg(I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[ \"workspace\", \"output\" ]");
if (config.disable_ws) {
i3_send_msg(I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[ \"output\" ]");
} else {
i3_send_msg(I3_IPC_MESSAGE_TYPE_SUBSCRIBE, "[ \"workspace\", \"output\" ]");
}
}