diff options
author | 2019-04-16 17:35:39 -0700 | |
---|---|---|
committer | 2019-04-16 23:48:44 -0400 | |
commit | aa4deef8a86ccddbd0d9a7d894e72ac329d8960d (patch) | |
tree | ed8912b35c93d3a2a259215cbbebc74d562369d7 /common/util.c | |
parent | Don't apply hide_edge_borders to floating windows (diff) | |
download | sway-aa4deef8a86ccddbd0d9a7d894e72ac329d8960d.tar.gz sway-aa4deef8a86ccddbd0d9a7d894e72ac329d8960d.tar.zst sway-aa4deef8a86ccddbd0d9a7d894e72ac329d8960d.zip |
Fix the payload type returned by IPC
If a client is subscribed and sends a subsequent ipc command which
causes event updates, then those event updates override the
`client->current_command` and send the incorrect type for the payload
associated with the command.
Example:
SUBSCRIBE {window}
RUN_COMMAND focus -> PAYLOAD_TYPE is 0x80000002 for window events
Therefore, we decouple the `client->current_command` by passing it as an
argument to the ipc_send_reply function, avoiding a data race. The same
is done for the `client->payload_length` as a precautionary measure for
the same reason.
Diffstat (limited to 'common/util.c')
0 files changed, 0 insertions, 0 deletions