aboutsummaryrefslogtreecommitdiff
path: root/src/taskbar.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-22 19:04:34 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-22 19:04:34 +0200
commitfcdc8d0324ab2848e85994d8033e52e6b82e8723 (patch)
tree78a6f6c9795796690aebba51f4bf8a0628249b11 /src/taskbar.c
parentf9cf1a4e89bbef715422665206949dfca561f770 (diff)
downloadjwm-fcdc8d0324ab2848e85994d8033e52e6b82e8723.tar.gz
Move cursor to window when middle-clicked in taskbar
Diffstat (limited to 'src/taskbar.c')
-rw-r--r--src/taskbar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/taskbar.c b/src/taskbar.c
index 8eb45d3..d86320d 100644
--- a/src/taskbar.c
+++ b/src/taskbar.c
@@ -267,6 +267,12 @@ void ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask) {
if(np) {
switch(mask) {
+ case Button2:
+ MoveMouseToClient(np->client);
+ if(np->client->state.status & STAT_ACTIVE
+ && np->client == nodes[np->client->state.layer])
+ break;
+ /* FALLTHROUGH */
case Button1:
if(np->client->state.status & STAT_ACTIVE
&& np->client == nodes[np->client->state.layer]) {