option to turn off struts
This commit is contained in:
parent
31bdacb3d7
commit
cbfb417dce
@ -183,6 +183,7 @@ struct bar_settings {
|
|||||||
position offset{0, 0};
|
position offset{0, 0};
|
||||||
side_values padding{ZERO_SPACE, ZERO_SPACE};
|
side_values padding{ZERO_SPACE, ZERO_SPACE};
|
||||||
side_values module_margin{ZERO_SPACE, ZERO_SPACE};
|
side_values module_margin{ZERO_SPACE, ZERO_SPACE};
|
||||||
|
bool struts{true};
|
||||||
struct {
|
struct {
|
||||||
int top;
|
int top;
|
||||||
int bottom;
|
int bottom;
|
||||||
|
@ -218,6 +218,8 @@ bar::bar(connection& conn, signal_emitter& emitter, const config& config, const
|
|||||||
|
|
||||||
m_opts.double_click_interval = m_conf.get(bs, "double-click-interval", m_opts.double_click_interval);
|
m_opts.double_click_interval = m_conf.get(bs, "double-click-interval", m_opts.double_click_interval);
|
||||||
|
|
||||||
|
m_opts.struts = m_conf.get(bs, "enable-struts", m_opts.struts);
|
||||||
|
|
||||||
if (only_initialize_values) {
|
if (only_initialize_values) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -546,6 +548,16 @@ void bar::reconfigure_pos() {
|
|||||||
* Reconfigure window strut values
|
* Reconfigure window strut values
|
||||||
*/
|
*/
|
||||||
void bar::reconfigure_struts() {
|
void bar::reconfigure_struts() {
|
||||||
|
if (!m_opts.struts) {
|
||||||
|
if (m_conf.has("global/wm", "margin-bottom")) {
|
||||||
|
m_log.warn("Struts are disabled, ignoring margin-bottom");
|
||||||
|
}
|
||||||
|
if (m_conf.has("global/wm", "margin-top")) {
|
||||||
|
m_log.warn("Struts are disabled, ignoring margin-top");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
window win{m_connection, m_opts.window};
|
window win{m_connection, m_opts.window};
|
||||||
if (m_visible) {
|
if (m_visible) {
|
||||||
auto geom = m_connection.get_geometry(m_screen->root());
|
auto geom = m_connection.get_geometry(m_screen->root());
|
||||||
|
Loading…
Reference in New Issue
Block a user