Xwindow父窗口中的透明窗口 [英] Transparent window in Xwindow parent
问题描述
我正在尝试在另一个正在运行的应用程序上方创建一个覆盖窗口. 假设是Firefox.我通过使用实现 Xcreatewindow
I am trying to create an overlay window above another running application. Let's say firefox. I implemented by using Xcreatewindow
win = XCreateWindow( display, *firefoxwindow,
50, 300, 400, 400,
0,
visualinfo.depth,
InputOutput,
visualinfo.visual,
CWColormap|CWEventMask|CWBackPixmap|CWBorderPixel,
&attr
) ;
我使用XQueryTree()搜索了* firefoxwindow
I searched *firefoxwindow by using XQueryTree()
,然后遵循此代码 https://gist.github.com/903479
当我将XRoot用作父级时,结果是透明窗口. 但是,当我尝试使用firefoxwindow或其他应用程序窗口作为父窗口时,它变得毫无根据.
The result is the transparent window when I use the XRoot as parent. But, when I try to use firefoxwindow or other application window as parent, it became optique.
推荐答案
在您的情况下,您需要手动将窗口像素图与背景窗口合成.当您创建以root为父级的窗口时,通过合成窗口管理器来处理透明度
In your case you need to composite window pixmap with background window manually. When you create window with root as parent transparency is handled by compositing window manager
这篇关于Xwindow父窗口中的透明窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!