Transparent window in Xwindow parent

戏子无情 提交于 2019-12-10 09:29:22

问题


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
                   ) ;

I searched *firefoxwindow by using XQueryTree()

and then followed this code https://gist.github.com/903479

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.


回答1:


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



来源:https://stackoverflow.com/questions/10685042/transparent-window-in-xwindow-parent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!