File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -294,14 +294,15 @@ class MainThing {
294294 // calculate now before executing any scripting since that can take some time
295295 let nowTime = Date . now
296296
297- var windowTitle : AnyObject ?
298- AXUIElementCopyAttributeValue ( axElement, kAXTitleAttribute as CFString , & windowTitle)
297+ var rawWindowTitle : AnyObject ?
298+ AXUIElementCopyAttributeValue ( axElement, kAXTitleAttribute as CFString , & rawWindowTitle)
299+ let windowTitle : String = rawWindowTitle as? String ?? " "
299300
300301 let applicationTitle = frontmost. localizedName!
301302
302303 // https://github.com/ActivityWatch/aw-watcher-window/issues/85
303- guard applicationTitle != " loginwindow " else {
304- log ( " loginwindow detected, ignoring " )
304+ guard applicationTitle != " loginwindow " && windowTitle != " Untitled " else {
305+ log ( " loginwindow or Untitled detected, ignoring " )
305306 return
306307 }
307308
You can’t perform that action at this time.
0 commit comments