Use a scrunched coarse terry cloth towel to squish a mosquito that is on a flat surface.
The coarse texture allows plenty of space for the air (and thus the bug) to remain in place until well after the first cloth fibers trap the insect.
This method is also quieter than slapping a wall or window with your open hand.
This method usually keeps the body of the dead bug in the towel, not on the wall (where slaps leave them).
For best results, quickly place the center of the towel on the bug, push firmly against the wall, then rotate the towel slightly.