]> git.lizzy.rs Git - bspwm.git/blobdiff - src/subscribe.h
Don't include pointer events in the node mask
[bspwm.git] / src / subscribe.h
index 26771be0e38a2deff670a4ef243453fadcc114a8..42caeb900a3fcaef9b4ce2977384c0c7a33e7730 100644 (file)
@@ -25,6 +25,8 @@
 #ifndef BSPWM_SUBSCRIBE_H
 #define BSPWM_SUBSCRIBE_H
 
+#define FIFO_TEMPLATE  "bspwm_fifo.XXXXXX"
+
 typedef enum {
        SBSC_MASK_REPORT = 1 << 0,
        SBSC_MASK_MONITOR_ADD = 1 << 1,
@@ -41,8 +43,8 @@ typedef enum {
        SBSC_MASK_DESKTOP_FOCUS = 1 << 12,
        SBSC_MASK_DESKTOP_ACTIVATE = 1 << 13,
        SBSC_MASK_DESKTOP_LAYOUT = 1 << 14,
-       SBSC_MASK_NODE_MANAGE = 1 << 15,
-       SBSC_MASK_NODE_UNMANAGE = 1 << 16,
+       SBSC_MASK_NODE_ADD = 1 << 15,
+       SBSC_MASK_NODE_REMOVE = 1 << 16,
        SBSC_MASK_NODE_SWAP = 1 << 17,
        SBSC_MASK_NODE_TRANSFER = 1 << 18,
        SBSC_MASK_NODE_FOCUS = 1 << 19,
@@ -56,14 +58,18 @@ typedef enum {
        SBSC_MASK_POINTER_ACTION = 1 << 27,
        SBSC_MASK_MONITOR = (1 << 7) - (1 << 1),
        SBSC_MASK_DESKTOP = (1 << 15) - (1 << 7),
-       SBSC_MASK_NODE = (1 << 28) - (1 << 15),
+       SBSC_MASK_NODE = (1 << 27) - (1 << 15),
        SBSC_MASK_ALL = (1 << 28) - 1
 } subscriber_mask_t;
 
-subscriber_list_t *make_subscriber_list(FILE *stream, int field, int count);
+subscriber_list_t *make_subscriber(FILE *stream, char *fifo_path, int field, int count);
 void remove_subscriber(subscriber_list_t *sb);
-void add_subscriber(FILE *stream, int field, int count);
+void add_subscriber(subscriber_list_t *sb);
 int print_report(FILE *stream);
 void put_status(subscriber_mask_t mask, ...);
 
+/* Remove any subscriber for which the stream has been closed and is no longer
+ * writable. */
+void prune_dead_subscribers(void);
+
 #endif