Registered Member
|
Firstly, Hi to all.
I'm new here. Didn't know where else to post this question, but I hope, that KDE developers will help to solve the problem I've been facing recently. I've examined the KDE source, and found some places where the similar techniques have been used. I'm trying to write a simple program, which redirects all the windows to the backbuffer( as the composite manager does ), then write them to pixmap and save to disk. Here is the code :
The code works fine if I redirect the pic to the frontBuffer, as a result I see the images of the windows on the screen. However, when I use pixmap.x11PictureHandle(), I get just black images saved to disk and no window pictures passed to them, so obviously I'm missing something. The tutorial I used : http://ktown.kde.org/~fredrik/composite_howto.html. Of course, I understand that some windows won't be rendered, but I can't get at least one rendered. Thanks for help in advance. |
Administrator
|
If you don't get a reply here, you may wish to ask on kde-devel@kde.org.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
|
Registered Member
|
Ok, the reason x11PictureHandle didn't work has been found.
By default, the QApplication uses "raster" graphics system, to render elements. In this case the x11PictureHandle for QPixmap does not work, as other buffers are used for QPixmap to be stored. If to set for QApplication in the main() function setGraphicsSystem( "native" ), then, the QPixmap is controlled by X11, so it has Picture Handle, and everything works fine. |
Registered users: Bing [Bot], claydoh, Google [Bot], markhm, rblackwell, sethaaaa, Sogou [Bot], Yahoo [Bot]