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,10 +101,13 @@ namespace modules {
|
||||
// First layout is treated as default by dwm
|
||||
m_default_layout = &m_layouts->at(0);
|
||||
m_current_layout = find_layout(m_bar_mon->layout.address.cur);
|
||||
m_secondary_layout = find_layout(m_secondary_layout_symbol);
|
||||
|
||||
if (m_secondary_layout == nullptr) {
|
||||
throw module_error("Secondary layout symbol does not exist");
|
||||
if (m_layout_click) {
|
||||
m_secondary_layout = find_layout(m_secondary_layout_symbol);
|
||||
|
||||
if (m_secondary_layout == nullptr) {
|
||||
throw module_error("Secondary layout symbol does not exist");
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize layout symbol
|
||||
|
Loading…
Reference in New Issue
Block a user