+
+ Match *swallows;
+ int n = 0;
+ TAILQ_FOREACH(swallows, &(state->con->swallow_head), matches) {
+ char *serialized = NULL;
+
+#define APPEND_REGEX(re_name) do { \
+ if (swallows->re_name != NULL) { \
+ sasprintf(&serialized, "%s%s" #re_name "=\"%s\"", \
+ (serialized ? serialized : "["), \
+ (serialized ? " " : ""), \
+ swallows->re_name->pattern); \
+ } \
+} while (0)
+
+ APPEND_REGEX(class);
+ APPEND_REGEX(instance);
+ APPEND_REGEX(window_role);
+ APPEND_REGEX(title);
+
+ if (serialized == NULL) {
+ DLOG("This swallows specification is not serializable?!\n");
+ continue;
+ }
+
+ sasprintf(&serialized, "%s]", serialized);
+ DLOG("con %p (placeholder 0x%08x) line %d: %s\n", state->con, state->window, n, serialized);
+
+ i3String *str = i3string_from_utf8(serialized);
+ draw_text(str, state->pixmap, state->gc, 2, (n * (config.font.height + 2)) + 2, state->rect.width - 2);
+ i3string_free(str);
+ n++;
+ free(serialized);
+ }
+
+ // TODO: render the watch symbol in a bigger font