mirror of
https://github.com/polybar/polybar.git
synced 2024-11-11 13:50:56 -05:00
parent
6b51234f23
commit
22f3af96b9
1 changed files with 4 additions and 6 deletions
|
@ -165,6 +165,9 @@ const tray_settings tray_manager::settings() const { // {{{
|
||||||
void tray_manager::bootstrap(tray_settings settings) { // {{{
|
void tray_manager::bootstrap(tray_settings settings) { // {{{
|
||||||
m_opts = settings;
|
m_opts = settings;
|
||||||
query_atom();
|
query_atom();
|
||||||
|
|
||||||
|
// Listen for visibility change events on the bar window
|
||||||
|
g_signals::bar::visibility_change = bind(&tray_manager::bar_visibility_change, this, placeholders::_1);
|
||||||
} // }}}
|
} // }}}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -191,11 +194,6 @@ void tray_manager::activate() { // {{{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listen for visibility change events on the bar window
|
|
||||||
if (!m_restacked && !g_signals::bar::visibility_change) {
|
|
||||||
g_signals::bar::visibility_change = bind(&tray_manager::bar_visibility_change, this, std::placeholders::_1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attempt to get control of the systray selection then
|
// Attempt to get control of the systray selection then
|
||||||
// notify clients waiting for a manager.
|
// notify clients waiting for a manager.
|
||||||
acquire_selection();
|
acquire_selection();
|
||||||
|
@ -779,7 +777,7 @@ void tray_manager::process_docking_request(xcb_window_t win) { // {{{
|
||||||
* toggle the tray window whenever the visibility of the bar window changes.
|
* toggle the tray window whenever the visibility of the bar window changes.
|
||||||
*/
|
*/
|
||||||
void tray_manager::bar_visibility_change(bool state) { // {{{
|
void tray_manager::bar_visibility_change(bool state) { // {{{
|
||||||
if (m_hidden == !state) {
|
if (!m_activated || m_restacked || m_hidden == !state) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue