aboutsummaryrefslogtreecommitdiff
path: root/src/event.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/event.c
parentf9cf1a4e89bbef715422665206949dfca561f770 (diff)
downloadjwm-fcdc8d0324ab2848e85994d8033e52e6b82e8723.tar.gz
Move cursor to window when middle-clicked in taskbar
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/event.c b/src/event.c
index d0e80fa..f88e2a5 100644
--- a/src/event.c
+++ b/src/event.c
@@ -338,7 +338,6 @@ void HandleButtonEvent(const XButtonEvent *event) {
void HandleKeyPress(const XKeyEvent *event) {
ClientNode *np;
KeyType key;
- int height, width, x, y;
key = GetKey(event);
@@ -376,21 +375,7 @@ void HandleKeyPress(const XKeyEvent *event) {
case KEY_RAISE:
if(np) {
RaiseClient(np);
- x = np->x;
- y = np->y;
- width = np->width;
- height = np->height;
- if(np->state.border & BORDER_OUTLINE) {
- x -= borderWidth;
- y -= borderWidth;
- width += borderWidth * 2;
- height += borderWidth * 2;
- }
- if(np->state.border & BORDER_TITLE) {
- y -= titleHeight;
- height += titleHeight;
- }
- MoveMouse(rootWindow, x + width / 2, y + height / 2);
+ MoveMouseToClient(np);
}
break;
case KEY_CLOSE: