How to know if a window has a menu , identify by WId ( was `Simple App to get window WId` )

Aaron Lewis aaron.lewis1989 at
Mon Aug 23 17:36:52 PDT 2010

	Still for the last plasma-globalmenu , now i've got some ideas , i
could grab the last focused window by remembering WId , and only if that
window has a `menu' , that will change the variable `lastWid' ..

So , something like this ..

In globalmenu.h

	WId wid;

In globalmenu.cpp:

void GlobalMenu::windowChanged ( WId wid ) {

	// If Window has a menu , remember lastWid;
	if ( X11->hasMenu ( lastWid ) ) {
		lastWid = wid;


So is there any API like X11->hasMenu ( WId wid ) ?

Source Code is here:

Thanks !

Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4R0NL3WI5 on freenode

More information about the xorg mailing list