void send_activeAp_atom_to_desktop(const gchar *command)
{
Display *x_display;
Window root;
GdkDisplay *g_display;
int def_screen;
Atom atom;
//printf("send atom/n");
g_display = gdk_display_get_default();
x_display = gdk_x11_display_get_xdisplay(g_display);
def_screen = DefaultScreen(x_display);
root = RootWindow(x_display, def_screen);
atom = XInternAtom(x_display, "_ACTIVE_AP_BY_OTHER", False);
XChangeProperty(x_display,root, atom, XA_STRING, 8,
PropModeReplace, command, strlen(command));
return;
}
此function向WM发送一个消息,而后在desktop状态栏上面显示命令的图标