Remove TODOs

Not doign this. Using the desired background as the X window background
color would require us to always first check before using the pixmap or
cairo context.
This commit is contained in:
patrick96 2023-03-25 17:31:52 +01:00
parent 616b3fe3e7
commit ac589b32dd
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
2 changed files with 2 additions and 4 deletions

View File

@ -80,7 +80,6 @@ client::client(
m_connection.create_pixmap_checked(client_depth, m_pixmap, m_wrapper, s.w, s.h); m_connection.create_pixmap_checked(client_depth, m_pixmap, m_wrapper, s.w, s.h);
} catch (const std::exception& err) { } catch (const std::exception& err) {
m_pixmap = XCB_NONE; m_pixmap = XCB_NONE;
// TODO in case of error, fall back to desired_background
m_log.err("Failed to create pixmap for tray background (err: %s)", err.what()); m_log.err("Failed to create pixmap for tray background (err: %s)", err.what());
throw; throw;
} }
@ -88,14 +87,12 @@ client::client(
try { try {
m_connection.change_window_attributes_checked(m_wrapper, XCB_CW_BACK_PIXMAP, &m_pixmap); m_connection.change_window_attributes_checked(m_wrapper, XCB_CW_BACK_PIXMAP, &m_pixmap);
} catch (const std::exception& err) { } catch (const std::exception& err) {
// TODO in case of error, fall back to desired_background
m_log.err("Failed to set tray window back pixmap (%s)", err.what()); m_log.err("Failed to set tray window back pixmap (%s)", err.what());
throw; throw;
} }
xcb_visualtype_t* visual = m_connection.visual_type_for_id(client_visual); xcb_visualtype_t* visual = m_connection.visual_type_for_id(client_visual);
if (!visual) { if (!visual) {
// TODO in case of error, fall back to desired_background
throw std::runtime_error("Failed to get root visual for tray background"); throw std::runtime_error("Failed to get root visual for tray background");
} }

View File

@ -458,7 +458,8 @@ void manager::process_docking_request(xcb_window_t win) {
m_clients.emplace_back(std::move(cl)); m_clients.emplace_back(std::move(cl));
} catch (const std::exception& err) { } catch (const std::exception& err) {
m_log.err("tray: Failed to setup tray client removing... (%s)", err.what()); m_log.err("tray: Failed to setup tray client '%s' (%s) removing... (%s)", ewmh_util::get_wm_name(win),
m_connection.id(win), err.what());
return; return;
} }
} }