Implemented window focusing