You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

DexterMagnific

Unregistered

1

Wednesday, August 11th 2004, 10:00am

Grabbing desktop

Hi,

To make transparent widgets, i use the QPixmap::grabWidget.
When i use it like this :

setBackgroundPixmap(QPixmap::grabWidget(QApplication::desktop()));

this doesn't work for the KDE Desktop and i get a black background (probably the grab returned a null pixmap)

but when i do this :

setBackgroundPixmap(QPixmap::grabWindow(0x1800009));

this works perfectly and the pixmap returns all the desktop pixels including children pixels if the desktop is covered by any application.

the 0x1800009 is the window Id of the KDE Desktop, and it seems it is constant.
I have launched two kde sessions (by running 2 X servers) and it still working

i have restarted my computer and it still working ..

any explanations ?