rem: smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret)
add: smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret, unsigned int width, unsigned int height)
context: smartPlaceWindow(WWindow *wwin, int *x_ret, int *y_ret){    WScreen *scr = wwin->screen_ptr;    int height,width;    int test_x = 0, test_y = Y_ORIGIN;    int loc_ok = False, tw,tx,ty,th;    int swidth, sx;    WWindow *test_window;    int extra_height;    if (wwin->frame)	extra_height = wwin->frame->top_width + wwin->frame->bottom_width + 2;    else	extra_height = 24; /* random value */        swidth = scr->scr_width;    sx = X_ORIGIN;    if (scr->dock && !scr->dock->lowered) {        if (scr->dock->on_right_side)            swidth -= wPreferences.icon_size + DOCK_EXTRA_SPACE;        else if (X_ORIGIN < wPreferences.icon_size + DOCK_EXTRA_SPACE)            sx += wPreferences.icon_size + DOCK_EXTRA_SPACE - X_ORIGIN;    }         /* this was based on fvwm2's smart placement */    height = wwin->client.height+extra_height;    width  = wwin->client.width;    while (((test_y + height) < (scr->scr_height)) && (!loc_ok)) {		test_x = sx;		while (((test_x + width) < swidth) && (!loc_ok)) {	    	    loc_ok = True;	    test_window = scr->focused_window;            	    while ((test_window != (WWindow *) 0) && (loc_ok == True)) {		                tw = test_window->client.width;                if (test_window->flags.shaded)                    th = test_window->frame->top_width;                else                    th = test_window->client.height+extra_height;		tx = test_window->frame_x;		ty = test_window->frame_y;                		if((tx<(test_x+width))&&((tx + tw) > test_x)&&		   (ty<(test_y+height))&&((ty + th)>test_y)&&                   (test_window->flags.mapped ||                    (test_window->flags.shaded &&                     !(test_window->flags.miniaturized ||                       test_window->flags.hidden)))) {                    loc_ok = False;		}		test_window = test_window->next;	    }	    	    test_window = scr->focused_window;	    	    while ((test_window != (WWindow *) 0) && (loc_ok == True))  {		                tw = test_window->client.width;                if (test_window->flags.shaded)                    th = test_window->frame->top_width;                else                    th = test_window->client.height+extra_height;		tx = test_window->frame_x;		ty = test_window->frame_y;				if((tx<(test_x+width))&&((tx + tw) > test_x)&&		   (ty<(test_y+height))&&((ty + th)>test_y)&&                   (test_window->flags.mapped ||                    (test_window->flags.shaded &&                     !(test_window->flags.miniaturized ||                       test_window->flags.hidden)))) {                    loc_ok = False;		}		test_window = test_window->prev;	    }	    if (loc_ok == True) {		*x_ret = test_x;		*y_ret = test_y;		break;	    }	    test_x += PLACETEST_HSTEP;	}	test_y += PLACETEST_VSTEP;    }    return loc_ok;}