From f6172e14597c255b6147ee2bc4683d322f3bf475 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Thu, 23 Mar 2023 22:27:43 +0100 Subject: [PATCH] Remove tray client gc Not actually used anywhere --- include/x11/tray_client.hpp | 1 - src/x11/tray_client.cpp | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/include/x11/tray_client.hpp b/include/x11/tray_client.hpp index 38a8d638..8da59ed1 100644 --- a/include/x11/tray_client.hpp +++ b/include/x11/tray_client.hpp @@ -124,7 +124,6 @@ class client : public non_copyable_mixin, public non_movable_mixin { shared_ptr m_bg_slice; unique_ptr m_context; unique_ptr m_surface; - xcb_gcontext_t m_gc{XCB_NONE}; xcb_pixmap_t m_pixmap{XCB_NONE}; }; diff --git a/src/x11/tray_client.cpp b/src/x11/tray_client.cpp index 57e3ba78..3a253dc1 100644 --- a/src/x11/tray_client.cpp +++ b/src/x11/tray_client.cpp @@ -84,20 +84,6 @@ client::client( throw; } - try { - m_gc = m_connection.generate_id(); - xcb_params_gc_t params{}; - uint32_t mask = 0; - XCB_AUX_ADD_PARAM(&mask, ¶ms, graphics_exposures, 1); - std::array values{}; - connection::pack_values(mask, ¶ms, values); - m_connection.create_gc_checked(m_gc, m_pixmap, mask, values.data()); - } catch (const std::exception& err) { - m_gc = XCB_NONE; - m_log.err("Failed to create gcontext for tray background (err: %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 @@ -119,10 +105,6 @@ client::~client() { m_connection.destroy_window(m_wrapper); } - if (m_gc != XCB_NONE) { - m_connection.free_gc(m_gc); - } - if (m_pixmap != XCB_NONE) { m_connection.free_pixmap(m_pixmap); }