all repos — fluxbox @ f4fab105fff5bce6ffd25cdb82184459018222bf

custom fork of the fluxbox windowmanager

avoid code duplication
Mathias Gumz akira at fluxbox dot org
commit

f4fab105fff5bce6ffd25cdb82184459018222bf

parent

64afa48bb3d1844cd9b05a7977b966bc58b222f2

1 files changed, 2 insertions(+), 21 deletions(-)

jump to
M src/WinClient.ccsrc/WinClient.cc

@@ -234,28 +234,9 @@ return textProperty(wm_role);

} void WinClient::updateWMClassHint() { - XClassHint ch; - if (XGetClassHint(display(), window(), &ch) == 0) { - fbdbg<<"WinClient: Failed to read class hint!"<<endl; - - m_instance_name = m_class_name = ""; - } else { - - if (ch.res_name != 0) { - m_instance_name = const_cast<char *>(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<char *>(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() {