tray: Remove delayed notifications
Unclear why it is needed, neither i3bar, nor stalonetray do delayed notifications
This commit is contained in:
parent
23153c3a23
commit
f3ce047c52
@ -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);
|
bool acquire_selection(xcb_window_t& other_owner);
|
||||||
void notify_clients();
|
void notify_clients();
|
||||||
void notify_clients_delayed();
|
|
||||||
|
|
||||||
void track_selection_owner(xcb_window_t owner);
|
void track_selection_owner(xcb_window_t owner);
|
||||||
void process_docking_request(xcb_window_t win);
|
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
|
* Whether the tray is visible
|
||||||
*/
|
*/
|
||||||
bool m_hidden{false};
|
bool m_hidden{false};
|
||||||
|
|
||||||
thread m_delaythread;
|
|
||||||
|
|
||||||
bool m_firstactivation{true};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace tray
|
} // namespace tray
|
||||||
|
@ -45,9 +45,6 @@ manager::manager(
|
|||||||
}
|
}
|
||||||
|
|
||||||
manager::~manager() {
|
manager::~manager() {
|
||||||
if (m_delaythread.joinable()) {
|
|
||||||
m_delaythread.join();
|
|
||||||
}
|
|
||||||
m_connection.detach_sink(this, SINK_PRIORITY_TRAY);
|
m_connection.detach_sink(this, SINK_PRIORITY_TRAY);
|
||||||
deactivate();
|
deactivate();
|
||||||
}
|
}
|
||||||
@ -141,15 +138,6 @@ void manager::activate() {
|
|||||||
m_state = state::ACTIVE;
|
m_state = state::ACTIVE;
|
||||||
|
|
||||||
notify_clients();
|
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
|
* Track changes to the given selection owner
|
||||||
* If it gets destroyed or goes away we can reactivate the tray_manager
|
* If it gets destroyed or goes away we can reactivate the tray_manager
|
||||||
|
Loading…
Reference in New Issue
Block a user