summaryrefslogtreecommitdiff
path: root/plugins/mouse
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-31 20:20:29 +0000
committerDana Jansens <danakj@orodu.net>2003-03-31 20:20:29 +0000
commit251983186d919ea6e0c16418cf7939c02ef59afa (patch)
tree38f5d6ab1bd68a451a42c3ee31474f1608c7da45 /plugins/mouse
parenta048c4302aa7c450fe7a97e69c15029eb5459ab2 (diff)
use the client's size instead of the frames size so the real size is used, not the size of the frame (avoids shaded window problem)
Diffstat (limited to 'plugins/mouse')
-rw-r--r--plugins/mouse/mouse.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c
index 0b2471ee..1ef0ee87 100644
--- a/plugins/mouse/mouse.c
+++ b/plugins/mouse/mouse.c
@@ -208,8 +208,15 @@ static void event(ObEvent *e, void *foo)
if (e->data.x.client != NULL) {
cx = e->data.x.client->frame->area.x;
cy = e->data.x.client->frame->area.y;
- cw = e->data.x.client->frame->area.width;
- ch = e->data.x.client->frame->area.height;
+ /* use the client size because the frame can be differently
+ sized (shaded windows) and we want this based on the clients
+ size */
+ cw = e->data.x.client->area.width +
+ e->data.x.client->frame->size.left +
+ e->data.x.client->frame->size.right;
+ ch = e->data.x.client->area.height +
+ e->data.x.client->frame->size.top +
+ e->data.x.client->frame->size.bottom;
px = e->data.x.e->xbutton.x_root;
py = e->data.x.e->xbutton.y_root;
corner = pick_corner(px, py, cx, cy, cw, ch);