aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-08 18:18:28 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-08 18:18:28 (GMT)
commitf4fab105fff5bce6ffd25cdb82184459018222bf (patch)
tree4687e0b7bdd4c00bfd8a472b7a2aa46d4eba6172
parent64afa48bb3d1844cd9b05a7977b966bc58b222f2 (diff)
downloadfluxbox-f4fab105fff5bce6ffd25cdb82184459018222bf.zip
fluxbox-f4fab105fff5bce6ffd25cdb82184459018222bf.tar.bz2
avoid code duplication
-rw-r--r--src/WinClient.cc23
1 files 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 {
234} 234}
235 235
236void WinClient::updateWMClassHint() { 236void WinClient::updateWMClassHint() {
237 XClassHint ch;
238 if (XGetClassHint(display(), window(), &ch) == 0) {
239 237
240 fbdbg<<"WinClient: Failed to read class hint!"<<endl; 238 m_instance_name = Xutil::getWMClassName(window());
241 239 m_class_name = Xutil::getWMClassClass(window());
242 m_instance_name = m_class_name = "";
243 } else {
244
245 if (ch.res_name != 0) {
246 m_instance_name = const_cast<char *>(ch.res_name);
247 XFree(ch.res_name);
248 ch.res_name = 0;
249 } else
250 m_instance_name = "";
251
252 if (ch.res_class != 0) {
253 m_class_name = const_cast<char *>(ch.res_class);
254 XFree(ch.res_class);
255 ch.res_class = 0;
256 } else
257 m_class_name = "";
258 }
259} 240}
260 241
261void WinClient::updateTransientInfo() { 242void WinClient::updateTransientInfo() {