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> {
|
struct tray_pos_change : public detail::value_signal<tray_pos_change, int> {
|
||||||
using base_type::base_type;
|
using base_type::base_type;
|
||||||
};
|
};
|
||||||
struct tray_visibility : public detail::value_signal<tray_visibility, bool> {
|
|
||||||
using base_type::base_type;
|
|
||||||
};
|
|
||||||
} // namespace ui_tray
|
} // namespace ui_tray
|
||||||
} // namespace signals
|
} // namespace signals
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ namespace signals {
|
|||||||
} // namespace ui
|
} // namespace ui
|
||||||
namespace ui_tray {
|
namespace ui_tray {
|
||||||
struct tray_pos_change;
|
struct tray_pos_change;
|
||||||
struct tray_visibility;
|
|
||||||
} // namespace ui_tray
|
} // namespace ui_tray
|
||||||
} // namespace signals
|
} // namespace signals
|
||||||
|
|
||||||
|
@ -116,12 +116,11 @@ class tray_client {
|
|||||||
unsigned int m_height;
|
unsigned int m_height;
|
||||||
};
|
};
|
||||||
|
|
||||||
class tray_manager
|
class tray_manager : public xpp::event::sink<evt::expose, evt::visibility_notify, evt::client_message,
|
||||||
: public xpp::event::sink<evt::expose, evt::visibility_notify, evt::client_message, evt::configure_request,
|
evt::configure_request, evt::resize_request, evt::selection_clear, evt::property_notify,
|
||||||
evt::resize_request, evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_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::dim_window,
|
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_copyable_mixin,
|
||||||
public non_movable_mixin {
|
public non_movable_mixin {
|
||||||
public:
|
public:
|
||||||
@ -194,7 +193,6 @@ class tray_manager
|
|||||||
bool on(const signals::ui::dim_window& evt) override;
|
bool on(const signals::ui::dim_window& 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;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
connection& m_connection;
|
connection& m_connection;
|
||||||
|
@ -76,11 +76,11 @@ struct tray_settings {
|
|||||||
|
|
||||||
using on_update = std::function<void(void)>;
|
using on_update = std::function<void(void)>;
|
||||||
|
|
||||||
class manager : public xpp::event::sink<evt::expose, evt::client_message, evt::configure_request, evt::resize_request,
|
class manager
|
||||||
evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_notify,
|
: public xpp::event::sink<evt::expose, evt::client_message, evt::configure_request, evt::resize_request,
|
||||||
evt::map_notify, evt::unmap_notify>,
|
evt::selection_clear, evt::property_notify, evt::reparent_notify, evt::destroy_notify, evt::map_notify,
|
||||||
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::update_background,
|
evt::unmap_notify>,
|
||||||
signals::ui_tray::tray_pos_change, signals::ui_tray::tray_visibility>,
|
public signal_receiver<SIGN_PRIORITY_TRAY, signals::ui::update_background, signals::ui_tray::tray_pos_change>,
|
||||||
non_copyable_mixin,
|
non_copyable_mixin,
|
||||||
non_movable_mixin {
|
non_movable_mixin {
|
||||||
public:
|
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::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;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
connection& m_connection;
|
connection& m_connection;
|
||||||
|
@ -1172,14 +1172,6 @@ bool tray_manager::on(const signals::ui_tray::tray_pos_change& evt) {
|
|||||||
return true;
|
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)
|
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) {}
|
: 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool manager::on(const signals::ui_tray::tray_visibility& evt) {
|
|
||||||
return change_visibility(evt.cast());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace tray
|
} // namespace tray
|
||||||
|
|
||||||
POLYBAR_NS_END
|
POLYBAR_NS_END
|
||||||
|
Loading…
Reference in New Issue
Block a user