fix(tray): Catch restack failure
This commit is contained in:
parent
738fc2a216
commit
de3e0458a6
@ -381,13 +381,18 @@ class traymanager
|
|||||||
m_settings.width + m_settings.spacing * 2, m_settings.height_fill, 0,
|
m_settings.width + m_settings.spacing * 2, m_settings.height_fill, 0,
|
||||||
XCB_WINDOW_CLASS_INPUT_OUTPUT, scr->root_visual, mask, values);
|
XCB_WINDOW_CLASS_INPUT_OUTPUT, scr->root_visual, mask, values);
|
||||||
|
|
||||||
// Put the tray window above the defined sibling in the window stack
|
try {
|
||||||
if (m_settings.sibling != XCB_NONE) {
|
// Put the tray window above the defined sibling in the window stack
|
||||||
const uint32_t value_mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE;
|
if (m_settings.sibling != XCB_NONE) {
|
||||||
const uint32_t value_list[2]{m_settings.sibling, XCB_STACK_MODE_ABOVE};
|
const uint32_t value_mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE;
|
||||||
m_connection.configure_window_checked(m_tray, value_mask, value_list);
|
const uint32_t value_list[2]{m_settings.sibling, XCB_STACK_MODE_ABOVE};
|
||||||
m_connection.flush();
|
m_connection.configure_window_checked(m_tray, value_mask, value_list);
|
||||||
m_restacked = true;
|
m_connection.flush();
|
||||||
|
m_restacked = true;
|
||||||
|
}
|
||||||
|
} catch (const std::exception& err) {
|
||||||
|
auto id = m_connection.id(m_settings.sibling);
|
||||||
|
m_log.trace("tray: Failed to put tray above %s in the stack (%s)", id, err.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user