Skip to content

Commit

Permalink
Fixed window focus edge case for some programs like Java applications.
Browse files Browse the repository at this point in the history
  • Loading branch information
avahe-kellenberger committed Nov 6, 2024
1 parent d38cae9 commit 0b2d610
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nimdowpkg/monitor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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,
Expand Down

0 comments on commit 0b2d610

Please sign in to comment.