]> Dogcows Code - chaz/openbox/blobdiff - plugins/mouse/mouse.c
default focus text color for titlebars is black
[chaz/openbox] / plugins / mouse / mouse.c
index f505c887487f1d9e6f56f0c348b92c98e20e9d51..1ef0ee8772a77813e632d2877733f5c401583643 100644 (file)
@@ -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);
@@ -240,7 +247,7 @@ static void event(ObEvent *e, void *foo)
                             e->data.x.client, e->data.x.e->xbutton.state,
                             e->data.x.e->xbutton.button,
                             cx, cy, cw, ch, dx, dy, TRUE, corner);
-                drag = FALSE;
+                drag = drag_used = FALSE;
                 
                 lbutton = 0;
             } else {
@@ -254,7 +261,7 @@ static void event(ObEvent *e, void *foo)
                     e->data.x.e->xbutton.y >= (signed)-b &&
                     e->data.x.e->xbutton.x < (signed)(w+b) &&
                     e->data.x.e->xbutton.y < (signed)(h+b)) {
-                    click =TRUE;
+                    click = TRUE;
                     /* double clicks happen if there were 2 in a row! */
                     if (lbutton == button &&
                         e->data.x.e->xbutton.time - 300 <= ltime) {
This page took 0.023404 seconds and 4 git commands to generate.