aboutsummaryrefslogtreecommitdiff
path: root/src/WinClient.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/WinClient.cc')
-rw-r--r--src/WinClient.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/WinClient.cc b/src/WinClient.cc
index 7e79dea..948a363 100644
--- a/src/WinClient.cc
+++ b/src/WinClient.cc
@@ -75,7 +75,6 @@ WinClient::WinClient(Window win, BScreen &screen, FluxboxWindow *fbwin):
75 send_focus_message(false), 75 send_focus_message(false),
76 send_close_message(false), 76 send_close_message(false),
77 m_win_gravity(0), 77 m_win_gravity(0),
78 m_class_name(""), m_instance_name(""),
79 m_title_override(false), 78 m_title_override(false),
80 m_icon_title_override(false), 79 m_icon_title_override(false),
81 m_blackbox_hint(0), 80 m_blackbox_hint(0),
@@ -223,15 +222,13 @@ bool WinClient::getWMName(XTextProperty &textprop) const {
223} 222}
224 223
225bool WinClient::getWMIconName(XTextProperty &textprop) const { 224bool WinClient::getWMIconName(XTextProperty &textprop) const {
226 return XGetWMName(display(), window(), &textprop); 225 return XGetWMIconName(display(), window(), &textprop);
227}
228
229const string &WinClient::getWMClassName() const {
230 return m_instance_name;
231} 226}
232 227
233const string &WinClient::getWMClassClass() const { 228string WinClient::getWMRole() const {
234 return m_class_name; 229 Atom wm_role = XInternAtom(FbTk::App::instance()->display(),
230 "WM_WINDOW_ROLE", False);
231 return textProperty(wm_role);
235} 232}
236 233
237const string &WinClient::title() const { 234const string &WinClient::title() const {
@@ -246,6 +243,7 @@ void WinClient::updateWMClassHint() {
246#ifdef DEBUG 243#ifdef DEBUG
247 cerr<<"WinClient: Failed to read class hint!"<<endl; 244 cerr<<"WinClient: Failed to read class hint!"<<endl;
248#endif //DEBUG 245#endif //DEBUG
246 m_instance_name = m_class_name = "";
249 } else { 247 } else {
250 248
251 if (ch.res_name != 0) { 249 if (ch.res_name != 0) {