简体   繁体   English

如何在Mac OS X(Xquartz)下更改X11窗口的透明度?

[英]How to change transparency of X11 window under Mac OS X (Xquartz)?

原子名为_NET_WM_WINDOW_OPACITY的XChangeProperty()返回BadRequest错误代码...

_NET_WM_WINDOW_OPACITY works by having the compositing manager apply opacity when it composites the window. _NET_WM_WINDOW_OPACITY通过使合成管理器在合成窗口时应用不透明度来工作。 You would need to be running a compositing manager that does this. 您将需要运行执行此操作的合成管理器。 (That said, even if you have no CM that's going to use the property, you should not get BadRequest; the BadRequest is likely due to a bug in how you're doing XChangeProperty, like an invalid window or atom or format) (也就是说,即使您没有要使用该属性的CM,也不应获取BadRequest; BadRequest可能是由于您在执行XChangeProperty时遇到的错误所致,例如无效的窗口,原子或格式)

Another thing you can try to do is just create your window with an ARGB visual and then paint alpha channel into the window itself. 您可以尝试做的另一件事是只创建具有ARGB视觉效果的窗口,然后将Alpha通道绘制到窗口本身中。 How to do this depends on which toolkit you're using, etc. And it's only possible if your X server has an ARGB visual, I don't know if Mac does. 如何执行此操作取决于您所使用的工具包等。而且,只有当您的X服务器具有ARGB视觉效果时,我才可能知道Mac是否可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM