Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级到macos Sequoia后应用窗口切换时卡顿 #137

Closed
chengpan168 opened this issue Sep 25, 2024 · 2 comments
Closed

升级到macos Sequoia后应用窗口切换时卡顿 #137

chengpan168 opened this issue Sep 25, 2024 · 2 comments

Comments

@chengpan168
Copy link

版本: v0.21.1(20240418113300)
macos: 15.0
在使用 Command + Tab 切换应用时, 偶发卡顿, 大概在停留在当前应用3秒左右, 鼠标出现loading样式, 然后才会正常切到另一个应用,不确定是不是输入法的问题, 切换系统输入法后卡顿消失。

@qwertyyb
Copy link
Owner

问题收到,我会抽时间验证此问题并处理,多谢反馈

@qwertyyb
Copy link
Owner

qwertyyb commented Nov 8, 2024

复现环境:

Snipaste_2024-11-08_16-15-04

分析过程:

运行过程中发现有如下 warning 输出:

Snipaste_2024-11-07_16-03-04 Snipaste_2024-11-07_16-07-27

可能关联的 issue: vChewing/vChewing-macOS#226

稳定复现的方式:

  1. VSCode 切换到英文输入
  2. 切换到 Chrome 并把输入法切换到中文输入
  3. 切换到 VSCode
  4. 再尝试切换回 Chrome,若此时 Chrome 中没有输入框聚焦,则会卡 3 秒左右才成功切换到 Chrome。
  5. 运行日志会报出 timed out 警告。

结合关联 issue 分析可能的原因如下:

  1. MacOS 15.1 需要先背一个锅,个人设备有限,目前仅在此设备上复现此问题,所以 MacOS 版本升级导致的兼容问题是表层原因。
  2. 按关联 issue 的相关猜测,可能在 activateServer 中同步调用 client() 上的相关方法会导致问题。

解决方案

经过验证,可以在 DispatchQueue.main.async 中异步调用方法,没在出现卡顿问题。

qwertyyb added a commit that referenced this issue Nov 8, 2024
qwertyyb added a commit that referenced this issue Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants