mirror of
https://github.com/swaywm/sway.git
synced 2025-11-11 13:29:51 -05:00
address feedback
This commit is contained in:
parent
235798ff8e
commit
6b308dbeb7
2 changed files with 17 additions and 39 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue