From ce6816737c25ee29a706c0cfe3ab614d279bb478 Mon Sep 17 00:00:00 2001 From: Robinhuett <5955614+Robinhuett@users.noreply.github.com> Date: Sat, 26 Jan 2019 19:02:11 +0100 Subject: [PATCH] fix(window): Ignore waybar With this, the window title waybar will be ignored so it wont flicker as decribed in #148 --- src/modules/sway/window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/sway/window.cpp b/src/modules/sway/window.cpp index b3baca1..ed36d0b 100644 --- a/src/modules/sway/window.cpp +++ b/src/modules/sway/window.cpp @@ -23,9 +23,11 @@ void waybar::modules::sway::Window::worker() try { auto res = ipc_.handleEvent(); auto parsed = parser_.parse(res.payload); + // Check for waybar prevents flicker when hovering window module if ((parsed["change"] == "focus" || parsed["change"] == "title") && parsed["container"]["focused"].asBool()) { - window_ = Glib::Markup::escape_text(parsed["container"]["name"].asString()); + window_ = Glib::Markup::escape_text(parsed["container"]["name"].asString() + && parsed["container"]["name"].asString() != "waybar"); windowId_ = parsed["container"]["id"].asInt(); dp.emit(); } else if ((parsed["change"] == "close"