X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fkeyboard%2Fkeyparse.c;h=b3c00f7e99f52870d6c8988b33c439c69b083b36;hb=7886b797a36f5a035a75a19424e0b3cf7825baf8;hp=15f6e0c5f3c87726edcd886a5f53acd144f8dc1c;hpb=47cc179781aec47bf317c5c15879fa0dad95de86;p=chaz%2Fopenbox diff --git a/plugins/keyboard/keyparse.c b/plugins/keyboard/keyparse.c index 15f6e0c5..b3c00f7e 100644 --- a/plugins/keyboard/keyparse.c +++ b/plugins/keyboard/keyparse.c @@ -1,4 +1,5 @@ #include "kernel/parse.h" +#include "kernel/prop.h" #include "keyboard.h" void keyparse(ParseToken *token) @@ -21,7 +22,7 @@ void keyparse(ParseToken *token) top = token->data.identifier; return; } else { - yyerror("syntax error (expected Key)"); + yyerror("syntax error (expected kbind)"); err = TRUE; } } else if (chain == NULL) { @@ -44,9 +45,11 @@ void keyparse(ParseToken *token) action = action_from_string(token->data.identifier); /* no move/resize with the keyboard */ - if (action && - (action->func == action_move || - action->func == action_resize)) { + if (action && action->func == action_moveresize && + action->data.moveresize.corner != + prop_atoms.net_wm_moveresize_move_keyboard && + action->data.moveresize.corner != + prop_atoms.net_wm_moveresize_size_keyboard) { action_free(action); action = NULL; } @@ -82,6 +85,8 @@ void keyparse(ParseToken *token) /* these use the argument */ if (action->func == action_execute || action->func == action_restart) action->data.execute.path = g_strdup(arg_str); + else if (action->func == action_showmenu) + action->data.showmenu.name = g_strdup(arg_str); if ((action->func == action_desktop || action->func == action_send_to_desktop) && arg_int) @@ -95,7 +100,7 @@ void keyparse(ParseToken *token) if (kbind(strchain, action)) action = NULL; /* don't free this if kbind succeeds */ else - yyerror("failed to add binding"); + yyerror("failed to add key binding"); /* free the char*'s */ g_list_free(strchain);