My bedroom window's lock broke, so I fitted a new one. the block of wood is because the bolt wasn't long enough to reach the wall.
https://cheezburger.com/7603960576/wall-extender