]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
oops, logic error
[chaz/openbox] / openbox / action.c
index eca4707a32074543dc4884a99a4e6191aecb32a9..73524ae4e0019af4cecabf7a0a5e73d3cb42fdf1 100644 (file)
@@ -1172,7 +1172,7 @@ void action_focus(union ActionData *data)
 void action_unfocus (union ActionData *data)
 {
     if (data->client.any.c == focus_client)
-        focus_fallback(OB_FOCUS_FALLBACK_UNFOCUSING);
+        focus_fallback(FALSE);
 }
 
 void action_iconify(union ActionData *data)
@@ -1345,14 +1345,21 @@ void action_move_relative(union ActionData *data)
 void action_resize_relative(union ActionData *data)
 {
     ObClient *c = data->relative.any.c;
+    gint x, y, ow, w, oh, h, lw, lh;
+
     client_action_start(data);
-    client_move_resize(c,
-                  c->area.x - data->relative.deltaxl * c->size_inc.width,
-                  c->area.y - data->relative.deltayu * c->size_inc.height,
-                  c->area.width + data->relative.deltax  * c->size_inc.width
-                                + data->relative.deltaxl * c->size_inc.width,
-                  c->area.height + data->relative.deltay  * c->size_inc.height
-                                 + data->relative.deltayu * c->size_inc.height);
+
+    x = c->area.x;
+    y = c->area.y;
+    ow = c->area.width;
+    w = ow + data->relative.deltax * c->size_inc.width
+        + data->relative.deltaxl * c->size_inc.width;
+    oh = c->area.height;
+    h = oh + data->relative.deltay * c->size_inc.height
+        + data->relative.deltayu * c->size_inc.height;
+    
+    client_try_configure(c, OB_CORNER_TOPLEFT, &x, &y, &w, &h, &lw, &lh, TRUE);
+    client_move_resize(c, x + (ow - w), y + (oh - h), w, h);
     client_action_end(data);
 }
 
This page took 0.023625 seconds and 4 git commands to generate.