- client_configure(client, Corner_TopLeft, x, y, w, h, TRUE, TRUE);
+
+ /* get the frame position */
+ frame_client_gravity(client->frame, &x, &y);
+
+ /* dont let windows move above/left into the strut unless they are
+ bigger than the available area */
+ a = screen_area(client->desktop);
+ if (e->xconfigurerequest.value_mask & CWX &&
+ w <= a->width && x < a->x)
+ x = a->x;
+ if (e->xconfigurerequest.value_mask & CWY &&
+ h <= a->height && y < a->y)
+ y = a->y;
+
+ /* go back to the client position */
+ frame_frame_gravity(client->frame, &x, &y);
+
+ client_configure(client, OB_CORNER_TOPLEFT,
+ x, y, w, h, FALSE, TRUE);
+