Handle pointer grabbing abortion / Special invalid focus values / Don't die if destroying fails

Here's a few commits: the oldest is a fix for issue #2.