[openbox] Forcing Openbox to reconfigure

Eric Bohlman ericbohlman at sbcglobal.net
Thu May 13 05:21:49 EDT 2010


Why does the following not cause Openbox to reconfigure?

#include  <X11/X.h>
#include <X11/Xlib.h>
main () {
     XEvent ce;
     Display *display=XOpenDisplay(NULL);
     int screen=DefaultScreen(display);
     Window root=RootWindow(display,screen);
     ce.xclient.type = ClientMessage;
     ce.xclient.message_type = XInternAtom(display,"_OB_CONTROL",0);
     ce.xclient.display = display;
     ce.xclient.window = root;
     ce.xclient.format = 32;
     ce.xclient.data.l[0] = 1; /* reconfigure */
     ce.xclient.data.l[1] = 0;
     ce.xclient.data.l[2] = 0;
     ce.xclient.data.l[3] = 0;
     ce.xclient.data.l[4] = 0;
     XSendEvent(display,root,0,
                        SubstructureNotifyMask | SubstructureRedirectMask,
                        &ce);
}

I get the feeling I must be doing something wrong with the root window, 
since otherwise this was lifted pretty directly from obconf. I've 
verified that _OB_CONTROL already exists as an atom.


More information about the openbox mailing list