@@ -45,20 +45,30 @@ class TitleBarManager {
4545 return
4646 }
4747 lastEventNumber = event. eventNumber
48+
49+ var bundleIdentifier : String ?
50+ if let pid = element. pid {
51+ bundleIdentifier = NSRunningApplication ( processIdentifier: pid) ? . bundleIdentifier
52+ }
53+
4854 if let toolbarFrame = windowElement. getChildElement ( . toolbar) ? . frame, toolbarFrame != . null {
49- titleBarFrame = titleBarFrame. union ( toolbarFrame)
55+ if let bundleIdentifier,
56+ let toolbarIgnoredIds = Defaults . doubleClickToolBarIgnoredApps. typedValue,
57+ toolbarIgnoredIds. contains ( bundleIdentifier) {
58+ // don't add the toolbar frame to the title bar
59+ } else {
60+ titleBarFrame = titleBarFrame. union ( toolbarFrame)
61+ }
5062 }
5163 guard
5264 titleBarFrame. contains ( location) ,
5365 element. isWindow == true || element. isToolbar == true || element. isGroup == true || element. isTabGroup == true || element. isStaticText == true
5466 else {
5567 return
5668 }
57- if let ignoredApps = Defaults . doubleClickTitleBarIgnoredApps. typedValue,
58- !ignoredApps. isEmpty,
59- let pid = element. pid,
60- let appId = NSRunningApplication ( processIdentifier: pid) ? . bundleIdentifier,
61- ignoredApps. contains ( appId) {
69+ if let bundleIdentifier,
70+ let ignoredApps = Defaults . doubleClickTitleBarIgnoredApps. typedValue,
71+ ignoredApps. contains ( bundleIdentifier) {
6272 return
6373 }
6474 if Defaults . doubleClickTitleBarRestore. enabled != false ,
0 commit comments