Merge pull request #154 from Robinhuett/window_ignore_self
fix(window): Ignore waybar
This commit is contained in:
commit
6f2d784d4e
|
@ -23,9 +23,11 @@ void waybar::modules::sway::Window::worker()
|
||||||
try {
|
try {
|
||||||
auto res = ipc_.handleEvent();
|
auto res = ipc_.handleEvent();
|
||||||
auto parsed = parser_.parse(res.payload);
|
auto parsed = parser_.parse(res.payload);
|
||||||
|
// 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());
|
window_ = Glib::Markup::escape_text(parsed["container"]["name"].asString()
|
||||||
|
&& parsed["container"]["name"].asString() != "waybar");
|
||||||
windowId_ = parsed["container"]["id"].asInt();
|
windowId_ = parsed["container"]["id"].asInt();
|
||||||
dp.emit();
|
dp.emit();
|
||||||
} else if ((parsed["change"] == "close"
|
} else if ((parsed["change"] == "close"
|
||||||
|
|
Loading…
Reference in New Issue