How to get the list of open windows from xserver

前端 未结 3 1376
醉话见心
醉话见心 2020-12-04 17:38

Anyone got an idea how to get from an Xserver the list of all open windows?

3条回答
  •  生来不讨喜
    2020-12-04 18:29

    If your window manager implements EWMH specification, you can also take a look at the _NET_CLIENT_LIST value of the root window. This is set by most modern window managers:

    xprop -root|grep ^_NET_CLIENT_LIST
    

    That value can easily be obtained programmatically, see your Xlib documentation!

提交回复
热议问题