Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?
A:
XGetWMHints()
seems to be the preferred way of doing it.
There's also the function XGetZoomHints()
, but that seems to have been deprecated.
greyfade
2009-11-13 05:58:26
That was not quite the thing I needed (if I am right, XGetWMHints() only allows to check window's **initial**, not current parameters). So, after some stressed thinking, I came up with this, should work at least under most circumstances: http://pastebin.com/f356a8010
mindbound
2009-11-13 14:47:33
I would suggest trying it and comparing it to its unmapped state. Also try checking its zoom state. I'm no X11 expert, so I don't know which is the most reliable. Do remember that different window managers handle iconification differently.
greyfade
2009-11-13 20:34:09
+1
A:
yes. there are several ways of doing it:
read the _NET_WM_STATE property and check its content (as described in 'http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2507241'). for code, how to do this see some windowmanagers (fluxbox or pekwm comes to mind)
read the WM_STATE property and check its content (as described in http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.3.1).
akira
2009-11-25 07:35:00