add support for the WM_CLASS property.
make getValue for a string array return the right number in nelements.
This commit is contained in:
parent
5fed16de70
commit
e8b6f65186
2 changed files with 3 additions and 1 deletions
|
@ -52,6 +52,7 @@ XAtom::XAtom(Display *d) {
|
||||||
_atoms[wm_take_focus] = create("WM_TAKE_FOCUS");
|
_atoms[wm_take_focus] = create("WM_TAKE_FOCUS");
|
||||||
_atoms[wm_name] = create("WM_NAME");
|
_atoms[wm_name] = create("WM_NAME");
|
||||||
_atoms[wm_icon_name] = create("WM_ICON_NAME");
|
_atoms[wm_icon_name] = create("WM_ICON_NAME");
|
||||||
|
_atoms[wm_class] = create("WM_CLASS");
|
||||||
_atoms[motif_wm_hints] = create("_MOTIF_WM_HINTS");
|
_atoms[motif_wm_hints] = create("_MOTIF_WM_HINTS");
|
||||||
_atoms[blackbox_hints] = create("_BLACKBOX_HINTS");
|
_atoms[blackbox_hints] = create("_BLACKBOX_HINTS");
|
||||||
_atoms[blackbox_attributes] = create("_BLACKBOX_ATTRIBUTES");
|
_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()
|
std::string::const_iterator tmp = it; // current string.begin()
|
||||||
it = std::find(tmp, end, '\0'); // look for null between tmp and end
|
it = std::find(tmp, end, '\0'); // look for null between tmp and end
|
||||||
strings.push_back(std::string(tmp, it)); // s[tmp:it)
|
strings.push_back(std::string(tmp, it)); // s[tmp:it)
|
||||||
|
++num;
|
||||||
if (it == end) break;
|
if (it == end) break;
|
||||||
++it;
|
++it;
|
||||||
if (it == end) break;
|
if (it == end) break;
|
||||||
++num;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nelements = num;
|
nelements = num;
|
||||||
|
|
|
@ -57,6 +57,7 @@ public:
|
||||||
wm_change_state,
|
wm_change_state,
|
||||||
wm_name,
|
wm_name,
|
||||||
wm_icon_name,
|
wm_icon_name,
|
||||||
|
wm_class,
|
||||||
motif_wm_hints,
|
motif_wm_hints,
|
||||||
blackbox_attributes,
|
blackbox_attributes,
|
||||||
blackbox_change_attributes,
|
blackbox_change_attributes,
|
||||||
|
|
Loading…
Reference in a new issue