diff --git a/include/components/types.hpp b/include/components/types.hpp index f4820c27..11b77e97 100644 --- a/include/components/types.hpp +++ b/include/components/types.hpp @@ -101,7 +101,7 @@ struct bar_settings { string wmname; string locale; - bool force_docking{false}; + bool override_redirect{false}; const xcb_rectangle_t inner_area(bool abspos = false) const { xcb_rectangle_t rect{0, 0, size.w, size.h}; diff --git a/src/components/bar.cpp b/src/components/bar.cpp index db6ffbbf..f257a201 100644 --- a/src/components/bar.cpp +++ b/src/components/bar.cpp @@ -77,7 +77,13 @@ void bar::bootstrap(bool nodraw) { m_opts.origin = edge::BOTTOM; } - GET_CONFIG_VALUE(bs, m_opts.force_docking, "dock"); + try { + m_opts.override_redirect = m_conf.get(bs, "dock"); + m_conf.warn_deprecated(bs, "dock", "override-redirect"); + } catch (const key_error& err) { + m_opts.override_redirect = m_conf.get(bs, "override-redirect", m_opts.override_redirect); + } + 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.right, "padding-right"); @@ -503,10 +509,10 @@ void bar::restack_window() { if (wm_restack == "bspwm") { restacked = bspwm_util::restack_above_root(m_connection, m_opts.monitor, m_window); #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); - } else if (wm_restack == "i3" && !m_opts.force_docking) { - m_log.warn("Ignoring restack of i3 window (not needed when dock = false)"); + } else if (wm_restack == "i3" && !m_opts.override_redirect) { + m_log.warn("Ignoring restack of i3 window (not needed when `override-redirect = false`)"); wm_restack.clear(); #endif } else { diff --git a/src/components/renderer.cpp b/src/components/renderer.cpp index 951c763e..77616bfd 100644 --- a/src/components/renderer.cpp +++ b/src/components/renderer.cpp @@ -57,7 +57,7 @@ renderer::renderer(connection& conn, const logger& logger, unique_ptr