From ac589b32dd887cc6358ea7a2d1c0f910912d7636 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Sat, 25 Mar 2023 17:31:52 +0100 Subject: [PATCH] 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. --- src/x11/tray_client.cpp | 3 --- src/x11/tray_manager.cpp | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/x11/tray_client.cpp b/src/x11/tray_client.cpp index 3de60b25..5baf20d0 100644 --- a/src/x11/tray_client.cpp +++ b/src/x11/tray_client.cpp @@ -80,7 +80,6 @@ client::client( m_connection.create_pixmap_checked(client_depth, m_pixmap, m_wrapper, s.w, s.h); } catch (const std::exception& err) { 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()); throw; } @@ -88,14 +87,12 @@ client::client( try { m_connection.change_window_attributes_checked(m_wrapper, XCB_CW_BACK_PIXMAP, &m_pixmap); } 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()); throw; } xcb_visualtype_t* visual = m_connection.visual_type_for_id(client_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"); } diff --git a/src/x11/tray_manager.cpp b/src/x11/tray_manager.cpp index d271a0dd..666d2271 100644 --- a/src/x11/tray_manager.cpp +++ b/src/x11/tray_manager.cpp @@ -458,7 +458,8 @@ void manager::process_docking_request(xcb_window_t win) { m_clients.emplace_back(std::move(cl)); } 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; } }