fix(controller): Checked request to update root window event mask

This commit is contained in:
Michael Carlberg 2016-10-18 17:53:10 +02:00
parent 5323167b1e
commit f09858a1ed
1 changed files with 8 additions and 2 deletions

View File

@ -153,8 +153,14 @@ class controller {
// Listen for events on the root window to be able to
// break the blocking wait call when cleaning up
m_log.trace("controller: Listen for events on the root window");
const uint32_t value_list[1]{XCB_EVENT_MASK_STRUCTURE_NOTIFY};
m_connection.change_window_attributes(m_connection.root(), XCB_CW_EVENT_MASK, value_list);
try {
const uint32_t value_list[1]{XCB_EVENT_MASK_STRUCTURE_NOTIFY};
m_connection.change_window_attributes_checked(
m_connection.root(), XCB_CW_EVENT_MASK, value_list);
} catch (const std::exception& err) {
throw application_error("Failed to change root window event mask: " + string{err.what()});
}
try {
m_log.trace("controller: Setup bar renderer");