View Full Version : gnome-panel menu show

August 27th, 2007, 06:55 PM
Hy there!

I'm using xfwm4 as window manager with gnome, because it's stable & fast compositor. Some days ago I decided to find a solution to show the gnome menu with hot-key from xfwm, but I can't. :S So today I got the metacity-s source package and looked into it, to find out how metacity calls the gnome-panel to show the menu.

The code i wrote looks like this:

Display *xdisplay;
XClientMessageEvent xevent;

xdisplay = XOpenDisplay(NULL);

char *atom_names[] = {
Atom atoms[G_N_ELEMENTS(atom_names)];

XInternAtoms (xdisplay, atom_names, G_N_ELEMENTS (atom_names), False, atoms);

xevent.type = ClientMessage;
xevent.window = DefaultRootWindow(xdisplay);
xevent.message_type = atoms[0];
xevent.format = 32;
xevent.data.l[0] = atoms[1];
xevent.data.l[1] = CurrentTime;

XUngrabKeyboard (xdisplay, CurrentTime);

XSendEvent (xdisplay,
(XEvent*) &xevent);
It's seem to work, but does nothing... :S

So my questions is:
Why it isn't work???? :D
How can I show debug information from gnome-panel and metacity (What is not running when i test my application, but I want to see it's debug information when it's calling the gnome-panel :P)

Thx :)