the proverbial dog who slept in a manger not because he wanted to eat the hay
there but to prevent the other animals from doing so. Now used allusively to refer to any churlish behaviour of that 'spoilsport' sort.
The phrase is quite old and is first cited in William Bullein's A dialogue against the feuer pestilence, 1564:
"Like vnto cruell Dogges liyng in a Maunger, neither eatyng the Haye theim selues ne sufferyng the Horse to feed thereof hymself."