MCPcopy Create free account
hub / github.com/deskflow/deskflow / atomToString

Method atomToString

src/lib/platform/XWindowsUtil.cpp:182–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182std::string XWindowsUtil::atomToString(Display *display, Atom atom)
183{
184 if (atom == 0) {
185 return "None";
186 }
187
188 bool error = false;
189 XWindowsUtil::ErrorLock lock(display, &error);
190 char *name = XGetAtomName(display, atom);
191 if (error) {
192 return deskflow::string::sprintf("<UNKNOWN> (%d)", (int)atom);
193 } else {
194 std::string msg = deskflow::string::sprintf("%s (%d)", name, (int)atom);
195 XFree(name);
196 return msg;
197 }
198}
199
200std::string XWindowsUtil::atomsToString(Display *display, const Atom *atom, uint32_t num)
201{

Callers

nothing calls this directly

Calls 1

sprintfFunction · 0.85

Tested by

no test coverage detected