GSList *config_desktops_names;
guint config_screen_firstdesk;
guint config_desktop_popup_time;
+gint config_emulate_xinerama;
gboolean config_resize_redraw;
gint config_resize_popup_show;
guint config_dock_app_move_button;
guint config_dock_app_move_modifiers;
-guint config_keyboard_reset_keycode;
-guint config_keyboard_reset_state;
+guint config_keyboard_reset_keycode;
+guint config_keyboard_reset_state;
+gboolean config_keyboard_rebind_on_mapping_notify;
gint config_mouse_threshold;
gint config_mouse_dclicktime;
gchar *keystring, **keys, **key;
xmlNodePtr n;
gboolean is_chroot = FALSE;
+ gboolean grab = TRUE;
if (!obt_xml_attr_string(node, "key", &keystring))
return;
obt_xml_attr_bool(node, "chroot", &is_chroot);
+ obt_xml_attr_bool(node, "grab", &grab);
keys = g_strsplit(keystring, " ", 0);
for (key = keys; *key; ++key) {
action = actions_parse(n);
if (action)
- keyboard_bind(keylist, action);
+ keyboard_bind(keylist, action, grab);
n = obt_xml_find_node(n->next, "action");
}
}
parse_key(n, NULL);
n = obt_xml_find_node(n->next, "keybind");
}
+
+ if ((n = obt_xml_find_node(node->children, "rebindOnMappingNotify")))
+ config_keyboard_rebind_on_mapping_notify = obt_xml_node_bool(n);
}
/*
while (nact) {
ObActionsAct *action;
- if ((action = actions_parse(nact)))
- mouse_bind(buttonstr, cx, mact, action);
+ if ((action = actions_parse(nact))) {
+ gchar *p = buttonstr;
+ while (*p) {
+ gchar *s = strchr(p, ' ');
+ if (s) {
+ *s = '\0';
+ } else {
+ s = p;
+ while (*++s);
+ s--;
+ }
+ mouse_bind(p, cx, mact, action);
+ actions_act_ref(action); /* ref the action for each binding */
+ p = s+1;
+ }
+ actions_act_unref(action); /* remove the extra ref */
+ }
nact = obt_xml_find_node(nact->next, "action");
}
g_free(buttonstr);
if ((n = obt_xml_find_node(node, "policy"))) {
if (obt_xml_node_contains(n, "UnderMouse"))
config_place_policy = OB_PLACE_POLICY_MOUSE;
+ if (obt_xml_node_contains(n, "Random"))
+ config_place_policy = OB_PLACE_POLICY_RANDOM;
}
if ((n = obt_xml_find_node(node, "center"))) {
config_place_center = obt_xml_node_bool(n);
*font = RrFontOpen(ob_rr_inst, name, size, weight, slant);
g_free(name);
+
+ if ((fnode = obt_xml_find_node(n->children, "description"))) {
+ gchar *s = obt_xml_node_string(fnode);
+ RrFontDescriptionFromString(*font, s);
+ g_free(s);
+ }
+
next_font:
n = obt_xml_find_node(n->next, "font");
}
if (d > 0)
config_screen_firstdesk = (unsigned) d;
}
+ if ((n = obt_xml_find_node(node, "emulatexinerama")))
+ config_emulate_xinerama = obt_xml_node_bool(n);
if ((n = obt_xml_find_node(node, "names"))) {
GSList *it;
xmlNodePtr nname;
};
for (it = binds; it->key; ++it) {
GList *l = g_list_append(NULL, g_strdup(it->key));
- keyboard_bind(l, actions_parse_string(it->actname));
+ keyboard_bind(l, actions_parse_string(it->actname), TRUE);
}
}
config_desktops_num = 4;
config_screen_firstdesk = 1;
+ config_emulate_xinerama = FALSE;
config_desktops_names = NULL;
config_desktop_popup_time = 875;
translate_key("C-g", &config_keyboard_reset_state,
&config_keyboard_reset_keycode);
+ config_keyboard_rebind_on_mapping_notify = TRUE;
bind_default_keyboard();