Can't get WM_STATE
RossComputerGuy opened this issue · 3 comments
RossComputerGuy commented
I can't get the WM_STATE
property https://tronche.com/gui/x/xlib/ICC/.
this.panel.app.getXClient().InternAtom(false,"WM_STATE",(err,WM_STATE) => {
if(err) throw err;
this.panel.app.getXClient().GetProperty(0,wID,WM_STATE,WM_STATE,0,32,(err,data) => {
if(err) throw err;
console.log(data);
this.windowCount++;
});
});
sidorares commented
GetProperty
third parameter is property type, see
Line 484 in 174cff9
https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:GetProperty
I think you can pass 0 for AnyPropertyType
, not sure what exactly type stored for WM_STATE, probably array of cardinals
santigimeno commented
WM_STATE
is not only a property but also a type. x11-prop should help you with that. Something like this should work:
x11prop.get_property(X, wid, 'WM_STATE', (err, data) => {
if (!err) {
console.log('WM_STATE: ' + data);
}
});
RossComputerGuy commented
Ok, got it to work. Now I just need to figure out which windows are visible/mapped.