msrdc.exe randomly stealing focus
- 最近写代码时,经常出现周期性失去焦点的情况
- 非常恼人,不确定是否是Q4的微软更新引起?
- 换了输入法也不行,只能借助工具来查看:
- 大神的工具非常好: 可以发现是remote app 启动了一个UI 进程:
- 每隔开几秒,大于8秒?
- 会自动打开一个新的,导致进程id一直在变化:
必须要快才能通过窗口句柄找到进程
FocusLogger
- FocusLogger 这个牛x,实时显示
- 发现就是这个进程
msrdc的问题一直都有发生
- msrdc.exe randomly stealing focus #894
- Keyboard Focus lost when entering WSL2 #17373
- automatically switches the input method when open wsl terminal on win11 #7511
解决办法
- 设置了这个以后,还是会发生
- wsl --shutodwn 都会卡主
重启电脑
- 重启后解决。