refactor: Rename dock
to override-redirect
This commit is contained in:
parent
d6a0c84e0b
commit
9f16e3fff7
@ -101,7 +101,7 @@ struct bar_settings {
|
|||||||
string wmname;
|
string wmname;
|
||||||
string locale;
|
string locale;
|
||||||
|
|
||||||
bool force_docking{false};
|
bool override_redirect{false};
|
||||||
|
|
||||||
const xcb_rectangle_t inner_area(bool abspos = false) const {
|
const xcb_rectangle_t inner_area(bool abspos = false) const {
|
||||||
xcb_rectangle_t rect{0, 0, size.w, size.h};
|
xcb_rectangle_t rect{0, 0, size.w, size.h};
|
||||||
|
@ -77,7 +77,13 @@ void bar::bootstrap(bool nodraw) {
|
|||||||
m_opts.origin = edge::BOTTOM;
|
m_opts.origin = edge::BOTTOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
GET_CONFIG_VALUE(bs, m_opts.force_docking, "dock");
|
try {
|
||||||
|
m_opts.override_redirect = m_conf.get<bool>(bs, "dock");
|
||||||
|
m_conf.warn_deprecated(bs, "dock", "override-redirect");
|
||||||
|
} catch (const key_error& err) {
|
||||||
|
m_opts.override_redirect = m_conf.get<bool>(bs, "override-redirect", m_opts.override_redirect);
|
||||||
|
}
|
||||||
|
|
||||||
GET_CONFIG_VALUE(bs, m_opts.spacing, "spacing");
|
GET_CONFIG_VALUE(bs, m_opts.spacing, "spacing");
|
||||||
GET_CONFIG_VALUE(bs, m_opts.padding.left, "padding-left");
|
GET_CONFIG_VALUE(bs, m_opts.padding.left, "padding-left");
|
||||||
GET_CONFIG_VALUE(bs, m_opts.padding.right, "padding-right");
|
GET_CONFIG_VALUE(bs, m_opts.padding.right, "padding-right");
|
||||||
@ -503,10 +509,10 @@ void bar::restack_window() {
|
|||||||
if (wm_restack == "bspwm") {
|
if (wm_restack == "bspwm") {
|
||||||
restacked = bspwm_util::restack_above_root(m_connection, m_opts.monitor, m_window);
|
restacked = bspwm_util::restack_above_root(m_connection, m_opts.monitor, m_window);
|
||||||
#if ENABLE_I3
|
#if ENABLE_I3
|
||||||
} else if (wm_restack == "i3" && m_opts.force_docking) {
|
} else if (wm_restack == "i3" && m_opts.override_redirect) {
|
||||||
restacked = i3_util::restack_above_root(m_connection, m_opts.monitor, m_window);
|
restacked = i3_util::restack_above_root(m_connection, m_opts.monitor, m_window);
|
||||||
} else if (wm_restack == "i3" && !m_opts.force_docking) {
|
} else if (wm_restack == "i3" && !m_opts.override_redirect) {
|
||||||
m_log.warn("Ignoring restack of i3 window (not needed when dock = false)");
|
m_log.warn("Ignoring restack of i3 window (not needed when `override-redirect = false`)");
|
||||||
wm_restack.clear();
|
wm_restack.clear();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,7 +57,7 @@ renderer::renderer(connection& conn, const logger& logger, unique_ptr<font_manag
|
|||||||
<< cw_params_event_mask(XCB_EVENT_MASK_PROPERTY_CHANGE
|
<< cw_params_event_mask(XCB_EVENT_MASK_PROPERTY_CHANGE
|
||||||
|XCB_EVENT_MASK_EXPOSURE
|
|XCB_EVENT_MASK_EXPOSURE
|
||||||
|XCB_EVENT_MASK_BUTTON_PRESS)
|
|XCB_EVENT_MASK_BUTTON_PRESS)
|
||||||
<< cw_params_override_redirect(m_bar.force_docking)
|
<< cw_params_override_redirect(m_bar.override_redirect)
|
||||||
<< cw_flush(true);
|
<< cw_flush(true);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user