PyRun_SimpleString("from openbox import *;");
// set up convenience global variables
PyRun_SimpleString("openbox = Openbox_instance()");
+ PyRun_SimpleString("display = Display_instance()");
// set up access to the python global variables
PyObject *obmodule = PyImport_AddModule("__main__");
ob::openbox->bindings()->setResetKey(key);
}
-PyObject *send_client_msg(Window target, int type, Window about,
+PyObject *send_client_msg(Window target, Atom type, Window about,
long data, long data1, long data2,
long data3, long data4)
{
- if (type < 0 || type >= otk::Property::NUM_ATOMS) {
- PyErr_SetString(PyExc_TypeError,
- "Invalid atom type. Must be from otk::Property::Atoms");
- return NULL;
- }
-
XEvent e;
e.xclient.type = ClientMessage;
e.xclient.format = 32;
- e.xclient.message_type =
- openbox->property()->atom((otk::Property::Atoms)type);
+ e.xclient.message_type = type;
e.xclient.window = about;
e.xclient.data.l[0] = data;
e.xclient.data.l[1] = data1;
e.xclient.data.l[3] = data3;
e.xclient.data.l[4] = data4;
- XSendEvent(otk::Display::display, target, false,
+ XSendEvent(**otk::display, target, false,
SubstructureRedirectMask | SubstructureNotifyMask,
&e);
Py_INCREF(Py_None); return Py_None;