If the window hasn't moved inside, then a bead of 'Clearfix', or PVA, can be run around the periphery, using a cocktail stick, and allowed to set. Carefully wipe off any excess, immediately after applying, with a wet finger tip of a wet (old) paint brush.
If the window has moved inwards slightly, it might be possible to pull it into place using a narrow strip of tape, before applying the 'Clearfix' or PVA - but that's your decision!
Once the window is set, then give it a coat of Future, as suggested by Paul, which will 'smooth out' the overall appearance, and add strength to the joint.