mirror of
https://github.com/swaywm/sway.git
synced 2024-12-01 19:06:38 +00:00
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.
This commit is contained in:
parent
d2d2fc545a
commit
6ade4bd7dd
|
@ -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) {
|
static bool ipc_has_event_listeners(enum ipc_command_type event) {
|
||||||
for (int i = 0; i < ipc_client_list->length; i++) {
|
for (int i = 0; i < ipc_client_list->length; i++) {
|
||||||
struct ipc_client *client = ipc_client_list->items[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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue