Possible fix for "flashing title bar" problem (don't grab in response to FocusIn/FocusOut - seems to cause an event loop).