def focus_window(hwnd): """ Focuses the given window. Args: hwnd (int): The window handler. """ wg.ShowWindow(hwnd, wc.SW_SHOW) wg.ShowWindow(hwnd, wc.SW_SHOWNOACTIVATE) wg.SetForegroundWindow(hwnd)