diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-07-12 02:24:30 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-07-12 02:24:30 +0000 |
| commit | e8b6f65186587ac8e79fcc81d8006ea1270a02d4 (patch) | |
| tree | 913f2263d0cec6adaa0b29d1b708f0e6fb8f3a31 /src | |
| parent | 5fed16de70c0fbe40c9e62667f80f612d027c717 (diff) | |
add support for the WM_CLASS property.
make getValue for a string array return the right number in nelements.
Diffstat (limited to 'src')
| -rw-r--r-- | src/XAtom.cc | 3 | ||||
| -rw-r--r-- | src/XAtom.hh | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/XAtom.cc b/src/XAtom.cc index 488c0511..f6d0be73 100644 --- a/src/XAtom.cc +++ b/src/XAtom.cc @@ -52,6 +52,7 @@ XAtom::XAtom(Display *d) { _atoms[wm_take_focus] = create("WM_TAKE_FOCUS"); _atoms[wm_name] = create("WM_NAME"); _atoms[wm_icon_name] = create("WM_ICON_NAME"); + _atoms[wm_class] = create("WM_CLASS"); _atoms[motif_wm_hints] = create("_MOTIF_WM_HINTS"); _atoms[blackbox_hints] = create("_BLACKBOX_HINTS"); _atoms[blackbox_attributes] = create("_BLACKBOX_ATTRIBUTES"); @@ -471,10 +472,10 @@ bool XAtom::getValue(Window win, Atoms atom, StringType type, std::string::const_iterator tmp = it; // current string.begin() it = std::find(tmp, end, '\0'); // look for null between tmp and end strings.push_back(std::string(tmp, it)); // s[tmp:it) + ++num; if (it == end) break; ++it; if (it == end) break; - ++num; } nelements = num; diff --git a/src/XAtom.hh b/src/XAtom.hh index f4474a4a..6e232c85 100644 --- a/src/XAtom.hh +++ b/src/XAtom.hh @@ -57,6 +57,7 @@ public: wm_change_state, wm_name, wm_icon_name, + wm_class, motif_wm_hints, blackbox_attributes, blackbox_change_attributes, |
