Top Level Window in the X Window System

I want to print on the screen information about top-level windows under Linux.

I am using xlib functions. I will successfully return from the root window to print all the information about the entire displayed item.

But I only need a top-level window. I can not find a good way to filter.

From Wikipedia:

Top-level windows are exactly the Direct sub-windows of the root window.

With this definition, I have some windows, such as: gnome-session, seahorse-daemon, notify-osd or the icons in my list, and I do not want them.

I also found a function: XmuClientWindow, but I do not understand its purpose.

+3
source share
2 answers

, , . - . Root Window (Wikipedia), , , . , . XQueryTree , .

, , , , , . XmuClientWindow , ( ) . reparent , , , ( , , ). / , , , (, , ). (XGetWMHints (3), XGetWMNormalHints (3), XGetWMSizeHints (3)), , - , , .

. VirtualBox .

+4
wmctrl -l 

root.

0

Source: https://habr.com/ru/post/1736621/


All Articles