- if (x >= a->x + a->width - 1)
- x = a->x + a->width - self->frame->area.width;
- if (y >= a->y + a->height - 1)
- y = a->y + a->height - self->frame->area.height;
- if (x + self->frame->area.width - 1 < a->x)
- x = a->x;
- if (y + self->frame->area.height - 1< a->y)
- y = a->y;
-
- frame_frame_gravity(self->frame, &x, &y); /* get where the client
- should be */
- client_configure(self, OB_CORNER_TOPLEFT, x, y,
- self->area.width, self->area.height,
- TRUE, TRUE);
+ if (*x >= a->x + a->width - 1)
+ *x = a->x + a->width - self->frame->area.width;
+ if (*y >= a->y + a->height - 1)
+ *y = a->y + a->height - self->frame->area.height;
+ if (*x + self->frame->area.width - 1 < a->x)
+ *x = a->x;
+ if (*y + self->frame->area.height - 1 < a->y)
+ *y = a->y;
+
+ if (rude) {
+ /* this is my MOZILLA BITCHSLAP. oh ya it fucking feels good.
+ Java can suck it too. */
+
+ /* dont let windows map/move into the strut unless they
+ are bigger than the available area */
+ if (w <= a->width) {
+ if (*x < a->x) *x = a->x;
+ if (*x + w > a->x + a->width)
+ *x = a->x + a->width - w;
+ }
+ if (h <= a->height) {
+ if (*y < a->y) *y = a->y;
+ if (*y + h > a->y + a->height)
+ *y = a->y + a->height - h;
+ }
+ }
+
+ frame_frame_gravity(self->frame, x, y); /* get where the client
+ should be */
+
+ return ox != *x || oy != *y;