Iterm does not bounce, show notification badge, fails to detect app is inactive
Bug report
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.4.22
- OS version: 14.0
- Attach here (drag-drop from finder into this window) com.googlecode.iterm2.plist
- Attach a debug log, if possible. debuglog.txt
- Attach a screen capture video if it would make the reproduction steps clearer.
PLEASE ATTACH YOUR PLIST FILE FOR BUG REPORTS! Seriously! I'll probably ask you for it if you don’t.
Detailed steps to reproduce the problem
- Run
while [ 1 ]; do echo -n '\a'; sleep 2; done
in both iterm and terminal.app - Change focus to a different app
What happened
Terminal.app will bounce icon, iterm will not, Terminal.app will show notification bell, iterm will not
What should have happened
Both iterm and terminal.app should bounce icon and show notification light.
Notes:
A similar issue was posted in 2013 (#2795 (closed)), and the commit did indeed make the icon bounce when needed (requestUserAttention
) ef4589f0. The current codebase has code to trigger the bounce https://github.com/search?q=repo%3Agnachman%2FiTerm2+BounceTrigger&type=code but I suppose it stopped working at some commit?
Looking at the log
1703040927.716325 VT100Screen.m:1496 (-[VT100Screen activateBell]): Beep: ring audible bell
1703040927.716549 PseudoTerminal.m:10332 (-[PseudoTerminal incrementBadge]): incrementBadge
1703040927.716556 PseudoTerminal.m:10344 (-[PseudoTerminal incrementBadge]): App is active so don't increment it
1703040927.716581 PTYSession.m:3048 (-[PTYSession finishedHandlingNewOutputOfLength:]): Session <PTYSession: 0x1310e2800 80x25 metal=0 id=DB666066-6CF7-4FD2-8C8E-69A0B87F8289> (sleep) is processing
For some reason iterm doesn't recognize that the app is inactive despite not being focused? I believe this is the source of the issue.
I'd be happy to work on the issue if no-one wants to pick it up
Here is a screen recording of the two Screen_Recording_2023-12-19_at_10.05.38_PM