Merge pull request #155 from Robinhuett/window_ignore_self_fix

fix(window): Fix #154
This commit is contained in:
Alex 2019-01-27 12:06:58 +01:00 committed by GitHub
commit 2f7b2677d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,9 +25,9 @@ void waybar::modules::sway::Window::worker()
auto parsed = parser_.parse(res.payload); auto parsed = parser_.parse(res.payload);
// Check for waybar prevents flicker when hovering window module // Check for waybar prevents flicker when hovering window module
if ((parsed["change"] == "focus" || parsed["change"] == "title") if ((parsed["change"] == "focus" || parsed["change"] == "title")
&& parsed["container"]["focused"].asBool()) { && parsed["container"]["focused"].asBool()
window_ = Glib::Markup::escape_text(parsed["container"]["name"].asString() && parsed["container"]["name"].asString() != "waybar") {
&& parsed["container"]["name"].asString() != "waybar"); window_ = Glib::Markup::escape_text(parsed["container"]["name"].asString());
windowId_ = parsed["container"]["id"].asInt(); windowId_ = parsed["container"]["id"].asInt();
dp.emit(); dp.emit();
} else if ((parsed["change"] == "close" } else if ((parsed["change"] == "close"