- int oldx, oldy, oldw, oldh;
-
- dispatch_move(moveresize_client, &cur_x, &cur_y);
-
- oldx = moveresize_client->frame->area.x;
- oldy = moveresize_client->frame->area.y;
- oldw = moveresize_client->frame->area.width;
- oldh = moveresize_client->frame->area.height;
- /* get where the client should be */
- frame_frame_gravity(moveresize_client->frame, &cur_x, &cur_y);
- client_configure(moveresize_client, Corner_TopLeft, cur_x, cur_y,
- start_cw, start_ch, TRUE, FALSE);
- /* draw the new one */
- if (moveresize_client->frame->area.x != oldx ||
- moveresize_client->frame->area.y != oldy ||
- moveresize_client->frame->area.width != oldw ||
- moveresize_client->frame->area.height != oldh) {
- if (!config_opaque_move)
- XDrawRectangle(ob_display, opaque_window.win, opaque_gc,
- moveresize_client->frame->area.x,
- moveresize_client->frame->area.y,
- moveresize_client->frame->area.width - 1,
- moveresize_client->frame->area.height - 1);
- /* erase the old one */
- if (!config_opaque_move && !first_draw)
- XDrawRectangle(ob_display, opaque_window.win, opaque_gc,
- oldx, oldy, oldw - 1, oldh - 1);
- first_draw = FALSE;
+ gint resist;
+
+ if (keyboard) resist = KEY_DIST - 1; /* resist for one key press */
+ else resist = config_resist_win;
+ resist_move_windows(moveresize_client, resist, &cur_x, &cur_y);
+ if (!keyboard) resist = config_resist_edge;
+ resist_move_monitors(moveresize_client, resist, &cur_x, &cur_y);
+
+ client_configure(moveresize_client, cur_x, cur_y,
+ moveresize_client->area.width,
+ moveresize_client->area.height,
+ TRUE, FALSE);
+ if (config_resize_popup_show == 2) /* == "Always" */
+ popup_coords(moveresize_client, "%d x %d",
+ moveresize_client->frame->area.x,
+ moveresize_client->frame->area.y);
+}
+
+static void do_resize()
+{
+ gint x, y, w, h, lw, lh;
+
+ /* see if it is actually going to resize */
+ x = 0;
+ y = 0;
+ w = cur_x;
+ h = cur_y;
+ client_try_configure(moveresize_client, &x, &y, &w, &h,
+ &lw, &lh, TRUE);
+ if (w == moveresize_client->area.width &&
+ h == moveresize_client->area.height)
+ {
+ return;