From fe4231b1dbb41f9eced8005b2e46453a81f08fa9 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 9 Jun 2020 19:48:35 +0200 Subject: Make sure to send update messages for all create messages that was originally the result of a move message. --- src/munia_proto.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/munia_proto.cc') diff --git a/src/munia_proto.cc b/src/munia_proto.cc index ef572e8..3349087 100644 --- a/src/munia_proto.cc +++ b/src/munia_proto.cc @@ -127,7 +127,7 @@ int callback_lws_node(struct lws *wsi, while(j != msgqueue[wsi].end()) { message_t m = *j; - if(m.cmd == cmd::create && // msg was a create msg? + if(m.cmd == cmd::create_with_attributes && // msg was a create msg? // created with same ids as we just removed? msg.remove.id == m.create.id && msg.tid == m.tid) @@ -166,7 +166,11 @@ int callback_lws_node(struct lws *wsi, { msgstr += " "; } - msgstr += std::to_string(msg.tid) + " " + msg_tostring(msg); + auto msgs = msg_tostring(msg); + for(const auto& msg_string : msgs) + { + msgstr += std::to_string(msg.tid) + " " + msg_string; + } } msgstr.append((size_t)LWS_SEND_BUFFER_POST_PADDING, ' '); -- cgit v1.2.3