From 698814d17fc03ebd953011fd9c1b478f205e89a3 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 16 Dec 2016 11:34:35 +0100 Subject: [PATCH] fix(xkeyboard): Only wrap click around the label --- src/modules/xkeyboard.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/modules/xkeyboard.cpp b/src/modules/xkeyboard.cpp index cfbcedb6..924991aa 100644 --- a/src/modules/xkeyboard.cpp +++ b/src/modules/xkeyboard.cpp @@ -99,10 +99,10 @@ namespace modules { * Map format tags to content */ bool xkeyboard_module::build(builder* builder, const string& tag) const { - builder->cmd(mousebtn::LEFT, EVENT_SWITCH); - if (tag == TAG_LABEL_LAYOUT) { + builder->cmd(mousebtn::LEFT, EVENT_SWITCH); builder->node(m_layout); + builder->cmd_close(); } else if (tag == TAG_LABEL_INDICATOR) { size_t n{0}; for (auto&& indicator : m_indicators) { @@ -116,8 +116,6 @@ namespace modules { return false; } - builder->cmd_close(); - return true; }