<div dir="ltr"><div><div>Hello,<br><br></div>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.<br></div><br>Can we go ahead with the current design for now while I will look at optimizing the implementation as a future step?<br><br>-Sonal<br><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 12, 2015 at 10:10 AM, Olivier Fourdan <span dir="ltr"><<a href="mailto:fourdan@gmail.com" target="_blank">fourdan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
I haven't looked much at the code, but using XGetImage and XImage<br>
conversion seem inappropriate here.<br>
<br>
Using a compositor, all client windows are unredirected, meaning they<br>
are rendered to an offscreen pixmap already, and the compositor has<br>
all that's required already, it "knows" about all this so all you need<br>
to do is to add hooks in the compositor to retrieve this and use that<br>
picture, that's all. Metacity's compositor was based originally on<br>
xfwm4's and had that feature up until not too long ago (not sure it's<br>
still there), you should look there for an example.<br>
<br>
Also, please note that the gtk_ prefix is for gtk alone.<br>
<br>
Cheers,<br>
Olivier<br></blockquote></div><br></div></div></div></div></div></div>