Remove tray_visibility signal
No longer needed since tray visibility is now controlled directly by the enclosing module
This commit is contained in:
parent
8566051336
commit
cbfbba0700
@ -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
|
||||
|
||||
|
@ -36,7 +36,6 @@ namespace signals {
|
||||
} // namespace ui
|
||||
namespace ui_tray {
|
||||
struct tray_pos_change;
|
||||
struct tray_visibility;
|
||||
} // namespace ui_tray
|
||||
} // namespace signals
|
||||
|
||||
|
@ -116,14 +116,13 @@ 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>,
|
||||
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>,
|
||||
public non_copyable_mixin,
|
||||
public non_movable_mixin {
|
||||
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>,
|
||||
public non_copyable_mixin,
|
||||
public non_movable_mixin {
|
||||
public:
|
||||
using make_type = unique_ptr<tray_manager>;
|
||||
static make_type make(const bar_settings& settings);
|
||||
@ -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;
|
||||
|
@ -76,13 +76,13 @@ 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>,
|
||||
non_copyable_mixin,
|
||||
non_movable_mixin {
|
||||
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:
|
||||
explicit manager(connection& conn, signal_emitter& emitter, const logger& logger, const bar_settings& bar_opts,
|
||||
on_update on_update);
|
||||
@ -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;
|
||||
|
@ -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) {}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user