diff options
author | 2018-08-02 08:11:10 +0100 | |
---|---|---|
committer | 2018-08-02 08:11:10 +0100 | |
commit | 47bf4ed0cbf104d09bba7f39acbf2ceb84c2c694 (patch) | |
tree | 8f0085c1829ab97a920acd9d5116732779177631 /swaymsg | |
parent | Correctly track saved surfaces during multiple transactions (diff) | |
parent | Merge pull request #2391 from RyanDwyer/fix-popups-v2 (diff) | |
download | sway-47bf4ed0cbf104d09bba7f39acbf2ceb84c2c694.tar.gz sway-47bf4ed0cbf104d09bba7f39acbf2ceb84c2c694.tar.zst sway-47bf4ed0cbf104d09bba7f39acbf2ceb84c2c694.zip |
Merge branch 'master' into fix-resize-wiggle
Diffstat (limited to 'swaymsg')
-rw-r--r-- | swaymsg/main.c | 8 | ||||
-rw-r--r-- | swaymsg/swaymsg.1.scd | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index c4141ca5..3767daf3 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -250,12 +250,16 @@ static void pretty_print(int type, json_object *resp) { | |||
250 | if (type != IPC_COMMAND && type != IPC_GET_WORKSPACES && | 250 | if (type != IPC_COMMAND && type != IPC_GET_WORKSPACES && |
251 | type != IPC_GET_INPUTS && type != IPC_GET_OUTPUTS && | 251 | type != IPC_GET_INPUTS && type != IPC_GET_OUTPUTS && |
252 | type != IPC_GET_VERSION && type != IPC_GET_SEATS && | 252 | type != IPC_GET_VERSION && type != IPC_GET_SEATS && |
253 | type != IPC_GET_CONFIG) { | 253 | type != IPC_GET_CONFIG && type != IPC_SEND_TICK) { |
254 | printf("%s\n", json_object_to_json_string_ext(resp, | 254 | printf("%s\n", json_object_to_json_string_ext(resp, |
255 | JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED)); | 255 | JSON_C_TO_STRING_PRETTY | JSON_C_TO_STRING_SPACED)); |
256 | return; | 256 | return; |
257 | } | 257 | } |
258 | 258 | ||
259 | if (type == IPC_SEND_TICK) { | ||
260 | return; | ||
261 | } | ||
262 | |||
259 | if (type == IPC_GET_VERSION) { | 263 | if (type == IPC_GET_VERSION) { |
260 | pretty_print_version(resp); | 264 | pretty_print_version(resp); |
261 | return; | 265 | return; |
@@ -384,6 +388,8 @@ int main(int argc, char **argv) { | |||
384 | type = IPC_GET_BINDING_MODES; | 388 | type = IPC_GET_BINDING_MODES; |
385 | } else if (strcasecmp(cmdtype, "get_config") == 0) { | 389 | } else if (strcasecmp(cmdtype, "get_config") == 0) { |
386 | type = IPC_GET_CONFIG; | 390 | type = IPC_GET_CONFIG; |
391 | } else if (strcasecmp(cmdtype, "send_tick") == 0) { | ||
392 | type = IPC_SEND_TICK; | ||
387 | } else { | 393 | } else { |
388 | sway_abort("Unknown message type %s", cmdtype); | 394 | sway_abort("Unknown message type %s", cmdtype); |
389 | } | 395 | } |
diff --git a/swaymsg/swaymsg.1.scd b/swaymsg/swaymsg.1.scd index a6e279da..8cf1b222 100644 --- a/swaymsg/swaymsg.1.scd +++ b/swaymsg/swaymsg.1.scd | |||
@@ -64,3 +64,6 @@ _swaymsg_ [options...] [message] | |||
64 | 64 | ||
65 | *get\_config* | 65 | *get\_config* |
66 | Gets a JSON-encoded copy of the current configuration. | 66 | Gets a JSON-encoded copy of the current configuration. |
67 | |||
68 | *send\_tick* | ||
69 | Sends a tick event to all subscribed clients. | ||