--- xfwm4/src/events.c 2017-03-26 20:43:26.677796197 -0700 +++ wm-test/xfwm4/src/events.c 2017-04-03 10:58:46.315811536 -0700 @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -952,6 +953,19 @@ { workspaceSwitch (screen_info, screen_info->current_ws + 1, NULL, TRUE, ev->time); } + else if (ev->button == Button10) + { + /* + * Consume the button event and perform an unconditional WS switch. + * (This 'gamer mouse' button event will never be sent to a client.) + * + * TODO: make all of these 'button actions' configurable, so that a User can avoid this behavior. + * When adding that feature also include 'Button11', 'Button12' ... through + * at least 'Button15'. If the mouse has them, they WILL work. + */ + workspaceSwitch (screen_info, screen_info->current_ws + 1, NULL, TRUE, ev->time); + } + else if (WIN_IS_BUTTON (win)) {