X11, how to detect I’m the last window/application on the display

Posted by ts on Stack Overflow See other posts from Stack Overflow or by ts
Published on 2010-04-26T14:30:17Z Indexed on 2010/04/26 14:33 UTC
Read the original article Hit count: 138

Filed under:
|
|

I have an x11 display with a windowmanager (sadly not a specific one, could be twm, dtwm, mwm, metacity …) , myApp and other applications with windows. I want to close the display if the other applications are closed and myApp is the only one with windows on the display. I do know the windows of myApp, but how do I distinguish between the windows of the windowmanger and of the other applications.

I’m currently polling with xwininfo -tree -root -children and comparing this to what I’m expecting, but this only works in a ‘well defined’ environment.

It seems that many of the above mentioned windowmanager don’t support EWMH.

© Stack Overflow or respective owner

Related posts about x11

Related posts about xlib