aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/event.c b/src/event.c
index 222764f..d0e80fa 100644
--- a/src/event.c
+++ b/src/event.c
@@ -338,6 +338,7 @@ void HandleButtonEvent(const XButtonEvent *event) {
void HandleKeyPress(const XKeyEvent *event) {
ClientNode *np;
KeyType key;
+ int height, width, x, y;
key = GetKey(event);
@@ -373,7 +374,24 @@ void HandleKeyPress(const XKeyEvent *event) {
FocusPreviousStackedCircular();
break;
case KEY_RAISE:
- RaiseClient(np);
+ 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);
+ }
break;
case KEY_CLOSE:
if(np) {