From f4fab105fff5bce6ffd25cdb82184459018222bf Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Wed, 8 Sep 2010 20:18:28 +0200 Subject: avoid code duplication --- src/WinClient.cc | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/WinClient.cc b/src/WinClient.cc index a276dc1..8b9e0f6 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc @@ -234,28 +234,9 @@ string WinClient::getWMRole() const { } void WinClient::updateWMClassHint() { - XClassHint ch; - if (XGetClassHint(display(), window(), &ch) == 0) { - fbdbg<<"WinClient: Failed to read class hint!"<(ch.res_name); - XFree(ch.res_name); - ch.res_name = 0; - } else - m_instance_name = ""; - - if (ch.res_class != 0) { - m_class_name = const_cast(ch.res_class); - XFree(ch.res_class); - ch.res_class = 0; - } else - m_class_name = ""; - } + m_instance_name = Xutil::getWMClassName(window()); + m_class_name = Xutil::getWMClassClass(window()); } void WinClient::updateTransientInfo() { -- cgit v0.11.2