mirror of https://github.com/polybar/polybar.git
fix(xwindow): Ignore xcb timestamp
This commit is contained in:
parent
ab5666a7ea
commit
1b159786f0
|
@ -82,9 +82,7 @@ namespace modules {
|
||||||
static constexpr auto TAG_LABEL = "<label>";
|
static constexpr auto TAG_LABEL = "<label>";
|
||||||
|
|
||||||
xcb_ewmh_connection_t m_ewmh;
|
xcb_ewmh_connection_t m_ewmh;
|
||||||
xcb_timestamp_t m_timestamp;
|
|
||||||
unique_ptr<active_window> m_active;
|
unique_ptr<active_window> m_active;
|
||||||
|
|
||||||
label_t m_label;
|
label_t m_label;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,9 +56,7 @@ namespace modules {
|
||||||
* Handler for XCB_PROPERTY_NOTIFY events
|
* Handler for XCB_PROPERTY_NOTIFY events
|
||||||
*/
|
*/
|
||||||
void xwindow_module::handle(const evt::property_notify& evt) {
|
void xwindow_module::handle(const evt::property_notify& evt) {
|
||||||
if (evt->time <= m_timestamp) {
|
if (evt->atom == _NET_ACTIVE_WINDOW) {
|
||||||
return;
|
|
||||||
} else if (evt->atom == _NET_ACTIVE_WINDOW) {
|
|
||||||
update();
|
update();
|
||||||
} else if (evt->atom == _NET_CURRENT_DESKTOP) {
|
} else if (evt->atom == _NET_CURRENT_DESKTOP) {
|
||||||
update();
|
update();
|
||||||
|
@ -69,8 +67,6 @@ namespace modules {
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_timestamp = evt->time;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue