I heard earlier that a player marked their ball on the green and when they put it back a gust of wind pushed it into a hazard and they had to take a penalty for it.

My question is the say your ball comes to rest right on the edge of the cup I mean 40% of the ball is over the cup, you mark your ball and then when you go to place it there is no way you can get it to sit the same way without it falling in or even say you get it to sit and the wind pushed it in is that considered to have gone in on the previous put?