I'm aware that if one's flag falls then the game is declared a win for the opposing side if something like "they have enough material to mate" or "it is possible to mate". I'm curious about an edge case which actually differentiates between the above two scenarios, i.e. the opposing side has enough material to mate but it's impossible to mate from that position (for whatever reason).
I think an example would illustrate best the situation I had in mind. Suppose White has a King on a1 and a Queen on a2, while Black only has a King on h1. If White then plays Qh2+ (perhaps in an online bullet game) and Black's flag falls, does White win? Note that from this position it is impossible for White to mate, since Black's only legal move here is to play Kxh2, which would be an immediate draw.
There are other scenarios which would be impossible to mate, e.g. if White has a King on a1, pawns on a4, c4, e4, g4, and Black has a King on h8, pawns on a5, c5, e5, g5 -- clearly neither side can mate from this position. (This sort of situation is slightly less interesting to me as this is position that is less likely to arise than the one described above, but I'm still curious.)