[Xfce4-commits] [xfce/xfwm4] 01/01: worspaces: Cycle via easy-move key + mouse fwd/bwd
noreply at xfce.org
noreply at xfce.org
Wed Jun 15 08:32:21 CEST 2016
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit 5effde6f2f12f8bbd895dbac14d7eb19dd897c7f
Author: Mike Murdoch <main.haarp at gmail.com>
Date: Tue Jun 14 21:42:57 2016 +0200
worspaces: Cycle via easy-move key + mouse fwd/bwd
Bug: 6427
Some mice have additional forward and backward buttons, use those with
the easy-move key to cycle through the workspaces.
---
src/events.c | 9 +++++++++
src/misc.h | 8 ++++++++
2 files changed, 17 insertions(+)
diff --git a/src/events.c b/src/events.c
index 8aa0f0a..e8b6b34 100644
--- a/src/events.c
+++ b/src/events.c
@@ -944,6 +944,15 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev)
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, NULL, TRUE, ev->time);
+ }
+ else if ((ev->button == Button9) && (state) && (state == screen_info->params->easy_click))
+ {
+ workspaceSwitch (screen_info, screen_info->current_ws + 1, NULL, TRUE, ev->time);
+ }
+
else if (WIN_IS_BUTTON (win))
{
if (ev->button <= Button3)
diff --git a/src/misc.h b/src/misc.h
index c8ae79e..2416b7d 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -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 *,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list