From ce3322bf913411292a1b4a7327e2d7c3ce4031cc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Jun 2022 10:13:21 +0530 Subject: [PATCH] Remote control: Fix commands with asynchronous payloads not sending responses Fixes #5165 --- docs/changelog.rst | 5 +++++ kitty/child-monitor.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index d77f6c1d9..305dd4f31 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -62,6 +62,11 @@ Detailed list of changes - Weston: Fix client side decorations flickering on slow computers during window resize (:iss:`5162`) +- Remote control: Fix commands with large or asynchronous payloads like + :command:`kitty @ set-backround-image`, :command:`kitty @ set-window-logo` + and :command:`kitty @ select-window` not working correctly + when using a socket (:iss:`5165`) + 0.25.1 [2022-05-26] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 7982ab9c0..0318e8d5f 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -424,7 +424,7 @@ parse_input(ChildMonitor *self) { } if (resp) { if (PyBytes_Check(resp)) send_response_to_peer(msg->peer_id, PyBytes_AS_STRING(resp), PyBytes_GET_SIZE(resp)); - else if (resp == Py_None) send_response_to_peer(msg->peer_id, NULL, 0); + else if (resp == Py_None || resp == Py_True) send_response_to_peer(msg->peer_id, NULL, 0); Py_CLEAR(resp); } else send_response_to_peer(msg->peer_id, NULL, 0); }