diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-04 19:09:52 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-04 19:09:52 +0000 |
| commit | d13f021b8bb2a6b8e49f69a370409e79a7f02213 (patch) | |
| tree | 7d1f157d2b72b5527c8913323531bbac97f3c853 /src/client.cc | |
| parent | 69c257faa94334b8d19fc97292622499c43929db (diff) | |
add support for wm_window_role
Diffstat (limited to 'src/client.cc')
| -rw-r--r-- | src/client.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/client.cc b/src/client.cc index a6990a8d..7b846729 100644 --- a/src/client.cc +++ b/src/client.cc @@ -478,17 +478,23 @@ void OBClient::updateClass() const otk::OBProperty *property = Openbox::instance->property(); // set the defaults - _app_name = _app_class = ""; + _app_name = _app_class = _role = ""; otk::OBProperty::StringVect v; unsigned long num = 2; - if (! property->get(_window, otk::OBProperty::wm_class, - otk::OBProperty::ascii, &num, &v)) - return; + if (property->get(_window, otk::OBProperty::wm_class, + otk::OBProperty::ascii, &num, &v)) { + if (num > 0) _app_name = v[0]; + if (num > 1) _app_class = v[1]; + } - if (num > 0) _app_name = v[0]; - if (num > 1) _app_class = v[1]; + v.clear(); + num = 1; + if (property->get(_window, otk::OBProperty::wm_window_role, + otk::OBProperty::ascii, &num, &v)) { + if (num > 0) _role = v[0]; + } } |
