Fixed programmatic component focus inside windows

Fixes issue #4