I have this code to check if a window has a certain atom in it's WM_PROTOCOLS property. <div><br><div><div>bool Window::haveProto(xcb_atom_t atom)</div><div>{</div><div> unsigned int counter;</div><div> std::cout << _protocols.atoms_len << std::endl;</div>
<div> for(counter = 0; counter < _protocols.atoms_len; counter++)</div><div> {</div><div> if (_protocols.atoms[counter] == atom)</div><div> {</div><div><br></div><div> return true;</div>
<div>
}</div><div> }</div><div> return false;</div><div>}</div><div><br></div><div>The problem is, I get a sigsegv on the third create notify. The reason is that with the previous two createnotifys is that the list of atoms was only 3 or 4 items long, but with the third, it's this huge number, 4294959856. Why such a large number of atoms? </div>
<div>Here is my code for getting the list:</div><div><br></div><div><div>xcb_icccm_get_wm_protocols_reply_t Window::getWMProtocols()</div><div>{</div><div> xcb_icccm_get_wm_protocols_reply_t reply;</div><div> xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_protocols_unchecked(globalconf.conn,</div>
<div> _id,</div><div> globalconf.atomMap["WM_PROTOCOLS"]);</div>
<div> xcb_icccm_get_wm_protocols_reply(globalconf.conn, cookie, &reply, NULL);</div><div> return reply;</div><div>}</div></div><div><br></div><div>I'm trying to pattern this off awesomewm's code for doing this.</div>
<div><br></div>-- <br>Praising my Savior all the day long,<div>Micah Nordland</div><br>
</div></div>