diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index 845da4a9..920455b9 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -219,6 +219,13 @@ The rest of this man page describes configuration options. - DoubleClick: Two presses within the doubleClickTime. - Drag: Pressing the button within the context, then moving the cursor +** + Load default mousebinds. This is an addition to the openbox + specification and provides a way to keep config files simpler whilst + allowing user specific binds. Note that if no rc.xml is found, or if no + entries exist, the same default mousebinds will be + loaded even if the element is not provided. + ## LIBINPUT ** diff --git a/src/config/rcxml.c b/src/config/rcxml.c index 3b04cd55..c0a92991 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -42,6 +42,7 @@ enum font_place { }; static void load_default_key_bindings(void); +static void load_default_mouse_bindings(void); static void fill_keybind(char *nodename, char *content) @@ -335,6 +336,11 @@ entry(xmlNode *node, char *nodename, char *content) load_default_key_bindings(); return; } + if (!strcmp(nodename, "devault.mouse") + || !strcmp(nodename, "default.mouse")) { + load_default_mouse_bindings(); + return; + } /* handle the rest */ if (!content) {