通过 Xlib 的窗口图标化状态
是否可以仅使用纯 X11/Xlib 的方式检查给定窗口是否已图标化/最小化,如果是,如何进行?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的。有几种方法可以做到这一点:
读取 _NET_WM_STATE 属性并检查其内容(如“http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2507241')。有关代码,如何执行此操作请参阅一些窗口管理器(fluxbox 或 pekwm 浮现在脑海中)
读取WM_STATE属性并检查其内容(如http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.3.1)。
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).
XGetWMHints()
似乎是首选的方法。
还有函数
XGetZoomHints()
,但似乎已被弃用。XGetWMHints()
seems to be the preferred way of doing it.There's also the function
XGetZoomHints()
, but that seems to have been deprecated.