Added wx and wy to window

Also changed somethings about how bkg and window are drawn