From 6ade4bd7dd1cc5eed68842b407aa3f690b1f8e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 6 Feb 2019 15:16:30 +0100 Subject: [PATCH] ipc_has_event_listeners: fix inverted check of subscribed_events subscribed_events is a bit mask, with each *set* bit representing an event the client has subscribed to. --- sway/ipc-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/ipc-server.c b/sway/ipc-server.c index eb6f159d..df57cba5 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -264,7 +264,7 @@ int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data) { static bool ipc_has_event_listeners(enum ipc_command_type event) { for (int i = 0; i < ipc_client_list->length; i++) { struct ipc_client *client = ipc_client_list->items[i]; - if ((client->subscribed_events & event_mask(event)) == 0) { + if ((client->subscribed_events & event_mask(event)) != 0) { return true; } }