Remove tray client gc

Not actually used anywhere
This commit is contained in:
patrick96 2023-03-23 22:27:43 +01:00
parent 1aeac226a6
commit f6172e1459
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
2 changed files with 0 additions and 19 deletions

View File

@ -124,7 +124,6 @@ class client : public non_copyable_mixin, public non_movable_mixin {
shared_ptr<bg_slice> m_bg_slice;
unique_ptr<cairo::context> m_context;
unique_ptr<cairo::xcb_surface> m_surface;
xcb_gcontext_t m_gc{XCB_NONE};
xcb_pixmap_t m_pixmap{XCB_NONE};
};

View File

@ -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, &params, graphics_exposures, 1);
std::array<uint32_t, 32> values{};
connection::pack_values(mask, &params, 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);
}