TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Tell HN: Screen freezing from device input on Gnome and X11 has a fix

2 点作者 monroewalker3 个月前

1 comment

monroewalker3 个月前
I&#x27;ve been working on a cross-platform clipboard manager launcher thing and using xdotool to simulate a ctrl+v on Ubuntu. On every paste though, the entire screen would freeze for a solid second. After a lot of exploring options I came across <a href="https:&#x2F;&#x2F;github.com&#x2F;robertwayne&#x2F;libmutter-fix&#x2F;tree&#x2F;main">https:&#x2F;&#x2F;github.com&#x2F;robertwayne&#x2F;libmutter-fix&#x2F;tree&#x2F;main</a>.<p>The TLDR as I understand it is that in Gnome&#x27;s Mutter, when a keyboard event is received from a different source than the last keyboard event, some expensive operation is kicked off (`keymap_changed`) which is unnecessary for most cases but required to handle something like switching to a keyboard with a different layout than the one last used.<p>The Github repo linked above has more info and links to related issue trackers and discussions. The solution implemented in the repo is to checkout libmutter and just remove the line causing `keymap_changed` to be called for `XkbNewKeyboardNotify` events.<p>Sharing in case anyone else happens to have been banging their head against the wall about this