From kde-devel Tue Oct 16 15:55:27 2001 From: Hamish Rodda Date: Tue, 16 Oct 2001 15:55:27 +0000 To: kde-devel Subject: Re: Kde3 suggestion -- alpha channel use X-MARC-Message: https://marc.info/?l=kde-devel&m=100324780628509 Hi all, I have done a little code-reading (and unsuccessful hacking) recently on this topic, as I was interested in seeing these effects too... On Tue, 16 Oct 2001, Roy Katz wrote: >I thought that the alpha blending provided by the RENDER extension (and >what QT 3.0 relies on?) does not support real-time translucency in the >sense that X does not notify obscured windows to repaint, even if the >obscuring window is translucent. From what I have read, this is true - the render extension only works in the context of an X client's window. >So... is it possible all of a sudden to have true, really really real-time >translucency? Unfortunately the answer seems to be no, for the time being. The critical document on this topic appears to be this one, written by Keith Packard (of XFree Render fame) last year: http://www.xfree86.org/~keithp/talks/KeithPackardAls2000/index.html His render page is located here: http://www.xfree86.org/~keithp/render/ At the bottom of this page is the most promising example of true translucent windows I could find. Also, it is promising to see there has recently been some discussion of this on the XFree Render mailing list: see the threads with the title "[Render] Translucent Windows Question" here: http://www.xfree86.org/pipermail/render/2001-October/thread.html It seems Keith is working on his proposed implementation, where a window would supply an alpha channel as a translucency mask, the "proper" way to implement these effects. This would enable pretty much everything that's been discussed and more (I can think up some really great uses in applications, plus a few security concerns (malicious invisible windows capturing input anyone?)). Unfortunately he mentions that this project is not his highest priority and a sample implementation could be expected in the six month range. The timing is quite unfortunate, because my guess is that the proper way of implementing this all-around would be to have support for it in QT, which has just stablilized. From fiddling around with kwin, it seems to me that it should be fairly easy to add drop-shadows and uniform transparency to windows when an appropriate X api is ready. However adding it to other parts of applications is a different story. If, say, you wanted a certain frame and its contents to be translucent, you would probably have to: a) patch QT (yuck) b) use a specialized KClass to contain the alpha transparent area (? less yuck) c) make the X calls yourself (yuck) I'm fairly new to KDE programming, so I'm not 100% sure if that's all correct, but it's what I understand at the moment. I don't know if adding the class mentioned in b) to kdelibs would break binary compatability, but if it would perhaps now is the time to think about doing so, while kde3 is still a moving target. I'm interested in doing some work on this over my holidays (I want to take on a project of some description) so we'll see how it goes... Cheers, Hamish >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<