我将外部窗口重新设置为 Qt 应用程序的父级(XReparentWindow、XMapRaished、XMoveResizeWindow
)。它有效,但是当我单击该重新设置父级的窗口时,系统锁定(没有鼠标或键盘事件),期望可能是重新设置父级的窗口内的某些输入,或者可能是我的应用程序。
例如,尝试嵌入 gedit 并单击它会导致仅在 gedit 中发生键盘事件(甚至禁用全局 Awesome 热键),并且不会在任何地方单击鼠标(除非我使用 Ctrl+Q 关闭嵌入的 gedit)。
如果使用 QX11EmbedContainer,则相同。即使对其执行 setEnabled(false)
。
为什么会锁?如何防止这种锁定或如何禁用某些 X 窗口的输入处理?
I reparent an external window into Qt application (XReparentWindow, XMapRaised, XMoveResizeWindow
). It works, but when I click to that reparented window the system locks (no mouse or keyboard events), expect of may be some input inside the reparented window or may be my application.
Trying to embed, for example, gedit and clicking into it leads to keyboard events only in gedit (and even global Awesome's hotkeys disabled) and no mouse clicks anywhere (unless I close embedded gedit using Ctrl+Q).
The same if using QX11EmbedContainer. Even if do setEnabled(false)
to it.
Why it locks up? How to prevent this lockup or how to disable input processing for some X window?
发布评论
评论(1)
XEmbed 规范涵盖了将窗口重新设置为自己的应用程序的父级。如果您阅读该规范,您会发现需要完成一些额外的工作才能完成这项工作:
http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html
Reparenting a window into one own's application is covered by the XEmbed specification. If you read that spec, you'll see, that some additional work is to be done to make this work:
http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html