The electors of Hanover and (after 1814) the kings of Hanover just happened to share a physical body with the kings of Great Britain, though they were separate legal entities. I wrote about this before a few years ago.