diff --git a/src/nimdowpkg/monitor.nim b/src/nimdowpkg/monitor.nim index aefbe91..184443a 100644 --- a/src/nimdowpkg/monitor.nim +++ b/src/nimdowpkg/monitor.nim @@ -268,6 +268,9 @@ proc keycodeToTagID*(this: Monitor, keycode: int): Option[TagID] = log "Invalid tag number from config: " & getCurrentExceptionMsg(), lvlError proc focusClient*(this: Monitor, client: Client, warpToClient: bool) = + if warpToClient: + this.display.warpTo(client) + this.setSelectedClient(client) if client.hasBeenMapped: @@ -280,9 +283,6 @@ proc focusClient*(this: Monitor, client: Client, warpToClient: bool) = client.takeFocus(this.display) - if warpToClient: - this.display.warpTo(client) - proc focusRootWindow(this: Monitor) = discard XSetInputFocus( this.display,