I’ve created simple application that monitors X11’s _NET_CLIENT_LIST. It prints me info when window ( including conky,tint2,… ) opens or closes. It works fine, except when i create menu (RMB-click or front Menu-Bar) it won’t print anything – that means they aren’t new windows, but they can be drawn out of window they are created from, so what is it?
I’d like create my own context menu in my app and i don’t want to use any toolkit ( GTK, QT,… ). So i need to know how do they work.
Adding another answer because the old one is for a different question entirely 🙂
Pop-up menus (whether RMB-activated or from a menu-bar) are perfectly normal X11 windows. The reason that you don’t see them in your monitoring program is that you are monitoring changes caused by the window manager. Pop-up menus normally bypass the WM entirely, so WM doesn’t know about them.
This is achieved by setting the
override_redirectwindow attributeXSetWindowAttributesstructure. Set it for your pop-up menus (and only for pop-up menus) and you should be all set.