]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/ipc.c
Implement disabling the workspace buttons („thx“ sECuRE)
[i3/i3] / i3bar / src / ipc.c
index c6a85cf5b74f7c766e3d85608ec66ae9fe648e0d..d06864c7ec1e83aac166c18fd5c2afebba78cee9 100644 (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\" ]");
+    }
 }