Skip to content

Commit 90bcf87

Browse files
committed
clean commands when mouse focus enabled
1 parent 0541aab commit 90bcf87

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Sources/AppBundle/config/parseConfig.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,12 @@ func parseCommandOrCommands(_ raw: TOMLValueConvertible) -> Parsed<[any Command]
170170

171171
var config = rawTable.parseTable(Config(), configParser, .root, &errors)
172172
if config.mouseWindowFocus {
173-
config.onFocusChanged = []
174-
config.onFocusedMonitorChanged = []
173+
config.onFocusChanged.removeAll { cmd in
174+
cmd.info.kind.rawValue.localizedCaseInsensitiveContains("mouse")
175+
}
176+
config.onFocusedMonitorChanged.removeAll { cmd in
177+
cmd.info.kind.rawValue.localizedCaseInsensitiveContains("mouse")
178+
}
175179
}
176180

177181
if let mapping = rawTable[keyMappingConfigRootKey].flatMap({ parseKeyMapping($0, .rootKey(keyMappingConfigRootKey), &errors) }) {

0 commit comments

Comments
 (0)