Window previews in xfwm4
fourdan at gmail.com
Wed Jan 14 19:52:35 CET 2015
The implementation I pointed out is actually much simpler than yours,
and you get GdkPixbuf as well, I reckon it's much better and efficient
than using XGetImage().
On 13 January 2015 at 15:52, Olivier Fourdan <fourdan at gmail.com> wrote:
> Nope, sorry.
> On 13 January 2015 at 15:08, Sonal Santan <sonal.santan at gmail.com> wrote:
>> IMHO this implementation fits very well with the existing infrastructure in
>> tabwin which expects a GdkPixbuf to draw onto the window buttons, requiring
>> minimal changes overall. I do agree that in an ideal world we would not use
>> XGetImage to capture the contents of the preview pixmap but directly render
>> the preview over a picture provided by the preview client. But that would
>> require more changes. Also, I believe this implementation is inline with my
>> original proposal of using XImage as a mechanism to exchange previews to
>> clients. The images are small so the overhead should not be huge.
>> Can we go ahead with the current design for now while I will look at
>> optimizing the implementation as a future step?
>> On Mon, Jan 12, 2015 at 10:10 AM, Olivier Fourdan <fourdan at gmail.com> wrote:
>>> I haven't looked much at the code, but using XGetImage and XImage
>>> conversion seem inappropriate here.
>>> Using a compositor, all client windows are unredirected, meaning they
>>> are rendered to an offscreen pixmap already, and the compositor has
>>> all that's required already, it "knows" about all this so all you need
>>> to do is to add hooks in the compositor to retrieve this and use that
>>> picture, that's all. Metacity's compositor was based originally on
>>> xfwm4's and had that feature up until not too long ago (not sure it's
>>> still there), you should look there for an example.
>>> Also, please note that the gtk_ prefix is for gtk alone.
>> Xfce4-dev mailing list
>> Xfce4-dev at xfce.org
More information about the Xfce4-dev