]> git.mdlowis.com Git - proto/labwc.git/commitdiff
rcxml.c: support 'to.action' in mousebind
authorJohan Malm <jgm323@gmail.com>
Sun, 30 Oct 2022 14:23:10 +0000 (14:23 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 30 Oct 2022 18:26:45 +0000 (18:26 +0000)
...in support to specifying 'left', 'right' and so on with actions
GoToDesktop and SendToDesktop.

For example:

    <mouse>
      <default/>
      <context name="Desktop">
        <mousebind button="Up" action="Scroll">
          <action name="GoToDesktop" to="left"/>
        </mousebind>
        <mousebind button="Down" action="Scroll">
          <action name="GoToDesktop" to="right"/>
        </mousebind>
      </context>
    </mouse>

src/config/rcxml.c

index 7664b50dff783925ca0d7dcfe447dd651f0981f1..c04150049afdd9d2153317bf89869597de982f08 100644 (file)
@@ -139,6 +139,8 @@ fill_mousebind(char *nodename, char *content)
                action_arg_add_str(current_mousebind_action, NULL, content);
        } else if (!strcmp(nodename, "menu.action")) {
                action_arg_add_str(current_mousebind_action, NULL, content);
+       } else if (!strcmp(nodename, "to.action")) {
+               action_arg_add_str(current_mousebind_action, NULL, content);
        }
 }