Remove tray_visibility signal

No longer needed since tray visibility is now controlled directly by the
enclosing module
This commit is contained in:
patrick96 2023-11-11 03:47:55 +01:00 committed by Patrick Ziegler
parent 8566051336
commit cbfbba0700
6 changed files with 14 additions and 33 deletions

View File

@ -104,9 +104,6 @@ namespace signals {
struct tray_pos_change : public detail::value_signal<tray_pos_change, int> {
using base_type::base_type;
};
struct tray_visibility : public detail::value_signal<tray_visibility, bool> {
using base_type::base_type;
};
} // namespace ui_tray
} // namespace signals

View File

@ -36,7 +36,6 @@ namespace signals {
} // namespace ui
namespace ui_tray {
struct tray_pos_change;
struct tray_visibility;
} // namespace ui_tray
} // namespace signals

View File

@ -116,12 +116,11 @@ class tray_client {
unsigned int m_height;
};
class tray_manager
: 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::map_notify, evt::unmap_notify>,
class tray_manager : 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::map_notify, evt::unmap_notify>,
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::visibility_change, signals::ui::dim_window,
signals::ui::update_background, signals::ui_tray::tray_pos_change, signals::ui_tray::tray_visibility>,
signals::ui::update_background, signals::ui_tray::tray_pos_change>,
public non_copyable_mixin,
public non_movable_mixin {
public:
@ -194,7 +193,6 @@ class tray_manager
bool on(const signals::ui::dim_window& 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_visibility& evt) override;
private:
connection& m_connection;

View File

@ -76,11 +76,11 @@ struct tray_settings {
using on_update = std::function<void(void)>;
class manager : public xpp::event::sink<evt::expose, evt::client_message, evt::configure_request, evt::resize_request,
evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_notify,
evt::map_notify, evt::unmap_notify>,
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::update_background,
signals::ui_tray::tray_pos_change, signals::ui_tray::tray_visibility>,
class manager
: public xpp::event::sink<evt::expose, evt::client_message, evt::configure_request, evt::resize_request,
evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_notify, evt::map_notify,
evt::unmap_notify>,
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::update_background, signals::ui_tray::tray_pos_change>,
non_copyable_mixin,
non_movable_mixin {
public:
@ -146,7 +146,6 @@ class manager : public xpp::event::sink<evt::expose, evt::client_message, evt::c
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_visibility& evt) override;
private:
connection& m_connection;

View File

@ -1172,14 +1172,6 @@ bool tray_manager::on(const signals::ui_tray::tray_pos_change& evt) {
return true;
}
bool tray_manager::on(const signals::ui_tray::tray_visibility& evt) {
if (evt.cast() == m_hidden && m_opts.tray_position == tray_postition::MODULE) {
return change_visibility(evt.cast());
} else {
return true;
}
}
tray_client::tray_client(connection& conn, xcb_window_t win, unsigned int w, unsigned int h)
: m_connection(conn), m_window(win), m_width(w), m_height(h) {}

View File

@ -764,10 +764,6 @@ bool manager::on(const signals::ui_tray::tray_pos_change& evt) {
return true;
}
bool manager::on(const signals::ui_tray::tray_visibility& evt) {
return change_visibility(evt.cast());
}
} // namespace tray
POLYBAR_NS_END