aboutsummaryrefslogtreecommitdiff
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 5fe5c755..045802e1 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -242,19 +242,13 @@ int ipc_client_handle_readable(int client_fd, uint32_t mask, void *data) {
}
static bool ipc_has_event_listeners(enum ipc_command_type event) {
- bool has_listeners = false;
-
- struct ipc_client *client;
for (int i = 0; i < ipc_client_list->length; i++) {
- client = ipc_client_list->items[i];
+ struct ipc_client *client = ipc_client_list->items[i];
if ((client->subscribed_events & event_mask(event)) == 0) {
- continue;
+ return true;
}
- has_listeners = true;
- break;
}
-
- return has_listeners;
+ return false;
}
static void ipc_send_event(const char *json_string, enum ipc_command_type event) {