Fixes problems with focus when clicking windows