Commit 5b80332 1 parent 73ca1fc commit 5b80332 Copy full SHA for 5b80332
File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -297,9 +297,17 @@ class MainThing {
297
297
var windowTitle : AnyObject ?
298
298
AXUIElementCopyAttributeValue ( axElement, kAXTitleAttribute as CFString , & windowTitle)
299
299
300
- var data = NetworkMessage ( app : frontmost. localizedName!, title : windowTitle as? String ?? " " )
300
+ let applicationTitle = frontmost. localizedName!
301
301
302
- if CHROME_BROWSERS . contains ( frontmost. localizedName!) {
302
+ // https://github.com/ActivityWatch/aw-watcher-window/issues/85
303
+ guard applicationTitle != " loginwindow " else {
304
+ log ( " loginwindow detected, ignoring " )
305
+ return
306
+ }
307
+
308
+ var data = NetworkMessage ( app: applicationTitle, title: windowTitle as? String ?? " " )
309
+
310
+ if CHROME_BROWSERS . contains ( applicationTitle) {
303
311
debug ( " Chrome browser detected, extracting URL and title " )
304
312
305
313
let chromeObject : ChromeProtocol = SBApplication . init ( bundleIdentifier: bundleIdentifier) !
@@ -323,7 +331,7 @@ class MainThing {
323
331
}
324
332
}
325
333
}
326
- } else if frontmost . localizedName == " Safari " {
334
+ } else if applicationTitle == " Safari " {
327
335
debug ( " Safari browser detected, extracting URL and title " )
328
336
329
337
let safariObject : SafariApplication = SBApplication . init ( bundleIdentifier: bundleIdentifier) !
You can’t perform that action at this time.
0 commit comments