Atoms prop_atoms;
#define CREATE(var, name) (prop_atoms.var = \
- XInternAtom(obt_display, name, FALSE))
+ XInternAtom(ob_display, name, FALSE))
void prop_startup(void)
{
CREATE(openbox_pid, "_OPENBOX_PID");
CREATE(ob_theme, "_OB_THEME");
+ CREATE(ob_config_file, "_OB_CONFIG_FILE");
CREATE(ob_wm_action_undecorate, "_OB_WM_ACTION_UNDECORATE");
CREATE(ob_wm_state_undecorated, "_OB_WM_STATE_UNDECORATED");
CREATE(ob_control, "_OB_CONTROL");
gulong ret_items, bytes_left;
glong num32 = 32 / size * num; /* num in 32-bit elements */
- res = XGetWindowProperty(obt_display, win, prop, 0l, num32,
+ res = XGetWindowProperty(ob_display, win, prop, 0l, num32,
FALSE, type, &ret_type, &ret_size,
&ret_items, &bytes_left, &xdata);
if (res == Success && ret_items && xdata) {
gint ret_size;
gulong ret_items, bytes_left;
- res = XGetWindowProperty(obt_display, win, prop, 0l, G_MAXLONG,
+ res = XGetWindowProperty(ob_display, win, prop, 0l, G_MAXLONG,
FALSE, type, &ret_type, &ret_size,
&ret_items, &bytes_left, &xdata);
if (res == Success) {
XTextProperty tprop;
gboolean ret = FALSE;
- if (XGetTextProperty(obt_display, win, &tprop, prop) && tprop.nitems) {
+ if (XGetTextProperty(ob_display, win, &tprop, prop) && tprop.nitems) {
if (XTextPropertyToStringList(&tprop, list, nstr))
ret = TRUE;
XFree(tprop.value);
void prop_set32(Window win, Atom prop, Atom type, gulong val)
{
- XChangeProperty(obt_display, win, prop, type, 32, PropModeReplace,
+ XChangeProperty(ob_display, win, prop, type, 32, PropModeReplace,
(guchar*)&val, 1);
}
void prop_set_array32(Window win, Atom prop, Atom type, gulong *val,
guint num)
{
- XChangeProperty(obt_display, win, prop, type, 32, PropModeReplace,
+ XChangeProperty(ob_display, win, prop, type, 32, PropModeReplace,
(guchar*)val, num);
}
void prop_set_string_utf8(Window win, Atom prop, const gchar *val)
{
- XChangeProperty(obt_display, win, prop, prop_atoms.utf8, 8,
+ XChangeProperty(ob_display, win, prop, prop_atoms.utf8, 8,
PropModeReplace, (const guchar*)val, strlen(val));
}
str = g_string_append(str, *s);
str = g_string_append_c(str, '\0');
}
- XChangeProperty(obt_display, win, prop, prop_atoms.utf8, 8,
+ XChangeProperty(ob_display, win, prop, prop_atoms.utf8, 8,
PropModeReplace, (guchar*)str->str, str->len);
g_string_free(str, TRUE);
}
void prop_erase(Window win, Atom prop)
{
- XDeleteProperty(obt_display, win, prop);
+ XDeleteProperty(ob_display, win, prop);
}
void prop_message(Window about, Atom messagetype, glong data0, glong data1,
glong data2, glong data3, glong mask)
{
- prop_message_to(RootWindow(obt_display, ob_screen), about, messagetype,
+ prop_message_to(RootWindow(ob_display, ob_screen), about, messagetype,
data0, data1, data2, data3, 0, mask);
}
XEvent ce;
ce.xclient.type = ClientMessage;
ce.xclient.message_type = messagetype;
- ce.xclient.display = obt_display;
+ ce.xclient.display = ob_display;
ce.xclient.window = about;
ce.xclient.format = 32;
ce.xclient.data.l[0] = data0;
ce.xclient.data.l[2] = data2;
ce.xclient.data.l[3] = data3;
ce.xclient.data.l[4] = data4;
- XSendEvent(obt_display, to, FALSE, mask, &ce);
+ XSendEvent(ob_display, to, FALSE, mask, &ce);
}