dwm: Only find secondary_layout if m_layout_click
Secondary layout would not be used otherwise.
This commit is contained in:
parent
7342b03240
commit
8c1085d6bd
@ -101,11 +101,14 @@ namespace modules {
|
|||||||
// First layout is treated as default by dwm
|
// First layout is treated as default by dwm
|
||||||
m_default_layout = &m_layouts->at(0);
|
m_default_layout = &m_layouts->at(0);
|
||||||
m_current_layout = find_layout(m_bar_mon->layout.address.cur);
|
m_current_layout = find_layout(m_bar_mon->layout.address.cur);
|
||||||
|
|
||||||
|
if (m_layout_click) {
|
||||||
m_secondary_layout = find_layout(m_secondary_layout_symbol);
|
m_secondary_layout = find_layout(m_secondary_layout_symbol);
|
||||||
|
|
||||||
if (m_secondary_layout == nullptr) {
|
if (m_secondary_layout == nullptr) {
|
||||||
throw module_error("Secondary layout symbol does not exist");
|
throw module_error("Secondary layout symbol does not exist");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize layout symbol
|
// Initialize layout symbol
|
||||||
update_layout_label(m_bar_mon->layout.symbol.cur);
|
update_layout_label(m_bar_mon->layout.symbol.cur);
|
||||||
|
Loading…
Reference in New Issue
Block a user