focus fixes

This fixes most of the focus issues when switching tabs in the inspector, together with the changes I pushed to GTK+.