X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=plugins%2Fmouse%2Ftranslate.c;h=aebe5557887717602efbf91b8e1607521b80b2bd;hb=7d943a950e39d4d93113c0efc7b41916f6b8c66d;hp=c73235958126ac9ab86230d3ce5434a7f6357a24;hpb=014384dba60a432e516bd754407b07e3f2c2d850;p=chaz%2Fopenbox diff --git a/plugins/mouse/translate.c b/plugins/mouse/translate.c index c7323595..aebe5557 100644 --- a/plugins/mouse/translate.c +++ b/plugins/mouse/translate.c @@ -1,4 +1,5 @@ -#include "../../kernel/openbox.h" +#include "kernel/openbox.h" +#include "mouse.h" #include #include #include @@ -50,7 +51,7 @@ gboolean translate_button(char *str, guint *state, guint *button) else if (!g_ascii_strcasecmp("Right", l)) *button = 3; else if (!g_ascii_strcasecmp("Up", l)) *button = 4; else if (!g_ascii_strcasecmp("Down", l)) *button = 5; - else *button = atoi(l); + else if (!g_ascii_strncasecmp("Button", l, 6)) *button = atoi(l+6); if (!*button) { g_warning("Invalid button '%s' in pointer binding.", l); goto translation_fail;