Shift + click = place the flag! You win then you open all fields without mine ( so flags should only stay on minefields!).