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,
|
||||
XCB_WINDOW_CLASS_INPUT_OUTPUT, scr->root_visual, mask, values);
|
||||
|
||||
// Put the tray window above the defined sibling in the window stack
|
||||
if (m_settings.sibling != XCB_NONE) {
|
||||
const uint32_t value_mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE;
|
||||
const uint32_t value_list[2]{m_settings.sibling, XCB_STACK_MODE_ABOVE};
|
||||
m_connection.configure_window_checked(m_tray, value_mask, value_list);
|
||||
m_connection.flush();
|
||||
m_restacked = true;
|
||||
try {
|
||||
// Put the tray window above the defined sibling in the window stack
|
||||
if (m_settings.sibling != XCB_NONE) {
|
||||
const uint32_t value_mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE;
|
||||
const uint32_t value_list[2]{m_settings.sibling, XCB_STACK_MODE_ABOVE};
|
||||
m_connection.configure_window_checked(m_tray, value_mask, value_list);
|
||||
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