I've noticed a problem with key handling on Ubuntu 8.04 when the 'Appearance->Visual Effects' setting is on 'Normal Effects'. The keyboard state gets cleared when the mouse is clicked, preventing the use of key modifiers like K_CTRL and stopping multi-selection from working.
The problem appears on all Upp apps, including the 2008.1 version of TheIde. I've also tested it with a svn version from about a week ago.
I have found a solution, but I am unsure whether it will cause any undesirable side effects, since I'm not sure why ClearKbdState_ is being called in TakeFocus at all.
It's very annoying that different settings on the same window manager can change it's X event profile!
OK. Obviously, ClearKbdState_ is called to prevent some similar undesirable effects of various WM... It is obviously strange that TakeFocus gets called so much often.
Anyway, I goes there really is nothing wrong with calling it only for focus really changing.. Applied.