X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmoveresize.c;h=1c31a2532d210686dc8eba4a190c1453e24bba85;hb=c6ad57fc734417deaba6c1634f4a7f81b9001604;hp=8928a995d75d7bb55935e2e71e33dca204f3073e;hpb=15450dc799a581bcefb9a6ad51b575cf46b647c5;p=chaz%2Fopenbox diff --git a/openbox/moveresize.c b/openbox/moveresize.c index 8928a995..1c31a253 100644 --- a/openbox/moveresize.c +++ b/openbox/moveresize.c @@ -71,6 +71,9 @@ void moveresize_start(ObClient *c, int x, int y, guint b, guint32 cnr) g_assert(!moveresize_in_progress); + if (!c->frame->visible) + return; + moveresize_client = c; start_cx = c->frame->area.x; start_cy = c->frame->area.y; @@ -79,8 +82,8 @@ void moveresize_start(ObClient *c, int x, int y, guint b, guint32 cnr) increment instead of at 0, so you have to move half an increment either way instead of a full increment one and 1 px the other. and this is one large mother fucking comment. */ - start_cw = c->area.width + (c->size_inc.width + 1) / 2; - start_ch = c->area.height + (c->size_inc.height + 1) / 2; + start_cw = c->area.width + c->size_inc.width / 2; + start_ch = c->area.height + c->size_inc.height / 2; start_x = x; start_y = y; corner = cnr; @@ -168,7 +171,8 @@ static void do_move(gboolean resist) /* get where the client should be */ frame_frame_gravity(moveresize_client->frame, &cur_x, &cur_y); client_configure(moveresize_client, OB_CORNER_TOPLEFT, cur_x, cur_y, - start_cw, start_ch, TRUE, FALSE); + moveresize_client->area.width, + moveresize_client->area.height, TRUE, FALSE); } static void do_resize(gboolean resist)