Skip to content

Commit

Permalink
Popped scratchpad windows should show a border
Browse files Browse the repository at this point in the history
  • Loading branch information
avahe-kellenberger committed Sep 2, 2024
1 parent 6928df5 commit 9bcf4e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nimdowpkg/config/configloader.nim
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ proc populateBarSettings*(this: Config, barSettings: var BarSettings, settingsTa
barSettings.transparency = clamp(barTransparency.intVal, 0, 255).uint8

let hasWindowsColor= this.loadHexValue(settingsTable, "barHasWindowsColor")
if hasWindowsColor!= -1:
if hasWindowsColor != -1:
barSettings.hasWindowsColor= hasWindowsColor
else:
barSettings.hasWindowsColor = fgColor
Expand Down
9 changes: 8 additions & 1 deletion src/nimdowpkg/windowmanager.nim
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,14 @@ proc popScratchpad(this: WindowManager) =

client.isFloating = true
this.moveClientToMonitor(client, selectedMonitorIndex)

client.borderWidth = this.windowSettings.borderWidth
client.adjustToState(this.display)
discard XSetWindowBorder(
this.display,
client.window,
this.windowSettings.borderColorFocused
)
else:
# Floating/fullscreen/etc
client.x = this.selectedMonitor.area.x +
Expand Down Expand Up @@ -777,7 +785,6 @@ proc focus*(this: WindowManager, client: Client, warpToClient: bool) =
if taggedClient != client:
this.unfocus(taggedClient)

this.selectedMonitor.setSelectedClient(client)
this.selectedMonitor.focusClient(client, warpToClient)
this.grabButtons(client, true)
if client.isFloating:
Expand Down

0 comments on commit 9bcf4e3

Please sign in to comment.