tray: Stop listening to ui::visibility_change

If the bar window (un)maps, the tray icons are automatically (un)mapped
This commit is contained in:
patrick96 2022-08-28 15:05:22 +02:00
parent de560fe810
commit 1dcff9396a
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
2 changed files with 1 additions and 11 deletions

View File

@ -60,7 +60,7 @@ class tray_manager
: public xpp::event::sink<evt::expose, evt::visibility_notify, evt::client_message, evt::configure_request, : public xpp::event::sink<evt::expose, evt::visibility_notify, evt::client_message, evt::configure_request,
evt::resize_request, evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_notify, evt::resize_request, evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_notify,
evt::map_notify, evt::unmap_notify>, evt::map_notify, evt::unmap_notify>,
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::visibility_change, signals::ui::update_background, public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::update_background,
signals::ui_tray::tray_pos_change, signals::ui_tray::tray_visibility> { signals::ui_tray::tray_pos_change, signals::ui_tray::tray_visibility> {
public: public:
using make_type = unique_ptr<tray_manager>; using make_type = unique_ptr<tray_manager>;
@ -126,7 +126,6 @@ class tray_manager
void handle(const evt::map_notify& evt) override; void handle(const evt::map_notify& evt) override;
void handle(const evt::unmap_notify& evt) override; void handle(const evt::unmap_notify& evt) override;
bool on(const signals::ui::visibility_change& evt) override;
bool on(const signals::ui::update_background& evt) override; bool on(const signals::ui::update_background& evt) override;
bool on(const signals::ui_tray::tray_pos_change& evt) override; bool on(const signals::ui_tray::tray_pos_change& evt) override;
bool on(const signals::ui_tray::tray_visibility& evt) override; bool on(const signals::ui_tray::tray_visibility& evt) override;

View File

@ -716,15 +716,6 @@ void tray_manager::handle(const evt::unmap_notify& evt) {
} }
} }
/**
* Signal handler connected to the bar window's visibility change signal.
* This is used as a fallback in case the window restacking fails. It will
* toggle the tray window whenever the visibility of the bar window changes.
*/
bool tray_manager::on(const signals::ui::visibility_change& evt) {
return change_visibility(evt.cast());
}
// TODO maybe remove signal // TODO maybe remove signal
bool tray_manager::on(const signals::ui::update_background&) { bool tray_manager::on(const signals::ui::update_background&) {
redraw_window(); redraw_window();