From 990f2a3074768f8a903a1853b629bcff7e061fd1 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Tue, 11 Oct 2016 09:25:32 +0200 Subject: [PATCH] fix(bspwm): Proper dispatch of ipc commands --- include/modules/bspwm.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/modules/bspwm.hpp b/include/modules/bspwm.hpp index 3646df98..17ce8c9f 100644 --- a/include/modules/bspwm.hpp +++ b/include/modules/bspwm.hpp @@ -310,12 +310,10 @@ namespace modules { return false; try { - auto ipc = bspwm_util::make_subscriber(); - auto command = string_util::from_stream(stringstream() << "desktop -f " << m_monitor << ":^" - << cmd.substr(strlen(EVENT_CLICK))); - auto payload = bspwm_util::make_payload(command); + auto ipc = bspwm_util::make_connection(); + auto payload = bspwm_util::make_payload("desktop -f "+ m_monitor +":^"+ cmd.substr(strlen(EVENT_CLICK))); - m_log.info("%s: Sending command to ipc handler '%s'", name(), command); + m_log.info("%s: Sending desktop focus command to ipc handler", name()); ipc->send(payload->data, payload->len, 0); ipc->disconnect(); @@ -339,7 +337,7 @@ namespace modules { static constexpr auto EVENT_CLICK = "bwm"; - bspwm_util::subscriber_t m_subscriber; + bspwm_util::connection_t m_subscriber; map m_modelabels; map m_statelabels; @@ -347,7 +345,6 @@ namespace modules { vector m_modes; iconset_t m_icons; string m_monitor; - // int m_socketfd = -1; unsigned long m_hash; }; }