tray: Remove delayed notifications

Unclear why it is needed, neither i3bar, nor stalonetray do delayed
notifications
This commit is contained in:
patrick96 2023-03-25 19:28:43 +01:00
parent 23153c3a23
commit f3ce047c52
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
2 changed files with 0 additions and 30 deletions

View File

@ -95,7 +95,6 @@ class manager : public xpp::event::sink<evt::expose, evt::client_message, evt::c
bool acquire_selection(xcb_window_t& other_owner);
void notify_clients();
void notify_clients_delayed();
void track_selection_owner(xcb_window_t owner);
void process_docking_request(xcb_window_t win);
@ -196,10 +195,6 @@ class manager : public xpp::event::sink<evt::expose, evt::client_message, evt::c
* Whether the tray is visible
*/
bool m_hidden{false};
thread m_delaythread;
bool m_firstactivation{true};
};
} // namespace tray

View File

@ -45,9 +45,6 @@ manager::manager(
}
manager::~manager() {
if (m_delaythread.joinable()) {
m_delaythread.join();
}
m_connection.detach_sink(this, SINK_PRIORITY_TRAY);
deactivate();
}
@ -141,15 +138,6 @@ void manager::activate() {
m_state = state::ACTIVE;
notify_clients();
// Send delayed notification
// TODO try to remove this?
// if (!m_firstactivation) {
// notify_clients();
// } else {
// notify_clients_delayed();
// }
m_firstactivation = false;
}
/**
@ -390,19 +378,6 @@ void manager::notify_clients() {
}
}
/**
* Send delayed notification to pending clients
*/
void manager::notify_clients_delayed() {
if (m_delaythread.joinable()) {
m_delaythread.join();
}
m_delaythread = thread([this]() {
this_thread::sleep_for(1s);
notify_clients();
});
}
/**
* Track changes to the given selection owner
* If it gets destroyed or goes away we can reactivate the tray_manager