Created attachment 2962 Patch to let the mousewheel and <super> switch workspaces anytime A lot of the time, one hand rests on the mouse, while the other hand rests on the keyboard. I have got used to cycle workspaces with <super><button 4|5> and xfwm4 did not allow me to configure that. Running a fresh install of xubuntu 10.4 it was not all too difficult to get the environment up to build xfwm4 from source and patch it as seen fit: --- events.c.ubuntu +++ events.c @@ -932,6 +932,13 @@ part = edgeGetPart (c, ev); edgeButton (c, part, ev); } + // dub sez... mouse wheel cycle workspaces with super key + else if ((state & SuperMask) && (screen_info->params->scroll_workspaces) + && ((ev->button == Button4) || (ev->button == Button5))) + { + rootScrollButton (display_info, ev); + } + // ...sez dub else if (WIN_IS_BUTTON (win)) { if (ev->button <= Button3) I fear that from now on I have to do this every time xubuntu updates the package, so I am asking you to make this a configurable option in your future releases. Think of it and you may like it too! Thank you -- peter
Patch pushed on git, closing.
Oh sorry, wrong bug!!
I cannot take that patch as-is, it's hard coding super as the modifier and conflict directly with the other uses of Super+mousewheel.
(In reply to Olivier Fourdan from comment #3) > I cannot take that patch as-is, it's hard coding super as the modifier and > conflict directly with the other uses of Super+mousewheel. I was also interested in this functionality, I implemented it properly (I think). It uses the "easy" key defined in Xfwm and the mouse backward/forward buttons (8 and 9), to switch workspaces. Most mice have these buttons nowadays. --- a/src/events.c 2016-06-14 15:08:16.995988539 +0200 +++ b/src/events.c 2016-06-14 15:50:45.999330481 +0200 @@ -944,6 +944,15 @@ handleButtonPress (DisplayInfo *display_ compositorZoomOut(screen_info, ev); } #endif /* HAVE_COMPOSITOR */ + else if ((ev->button == Button8) && (state) && (state == screen_info->params->easy_click)) + { + workspaceSwitch (screen_info, screen_info->current_ws - 1, c, TRUE, ev->time); + } + else if ((ev->button == Button9) && (state) && (state == screen_info->params->easy_click)) + { + workspaceSwitch (screen_info, screen_info->current_ws + 1, c, TRUE, ev->time); + } + else if (WIN_IS_BUTTON (win)) { if (ev->button <= Button3) --- a/src/misc.h 2016-06-14 15:51:38.762663991 +0200 +++ b/src/misc.h 2016-06-14 15:52:01.115997400 +0200 @@ -46,6 +46,14 @@ #define Button7 7 #endif +#ifndef Button8 +#define Button8 8 +#endif + +#ifndef Button9 +#define Button9 9 +#endif + unsigned int getMouseXY (ScreenInfo *, Window, int *,
Yeah, I see no problem with using the additional (unused) buttons for that, if you can cook up a properly formatted git format-patch and attach it here, I would push it.
Created attachment 6704 Patch to enable workspace switching via easy-move key + mouse8/9 (In reply to Olivier Fourdan from comment #5) > Yeah, I see no problem with using the additional (unused) buttons for that, > if you can cook up a properly formatted git format-patch and attach it here, > I would push it. Here you go!
Pushed to master as commit 5effde6 with small changes in the commit message.
(In reply to Olivier Fourdan from comment #7) > Pushed to master as commit 5effde6 with small changes in the commit message. Sweet, thanks!