Re: Drawing on desktop (root window) under X11

Maurizio Berti <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAPn+-XTSCd=UJv=0ey_ecYiqt9EF4cXexNcR1EKEf_m6c4HOFA@mail.gmail.com>
Il giorno mar 23 lug 2019 alle ore 12:00 David Boddie <[email protected]>
ha scritto:

> The documentation about drawing on the desktop is very old - from Qt 3, if
> not earlier. I remember trying to draw on the desktop with Qt 4 (and maybe
> even Qt 3) using similar techniques but didn't manage to make it work.
> I would be very surprised if any modern desktop would allow this to be
> done.
>

I thought the same thing, but I decided to give it a try anyway.

Plus, the painting model changed in Qt 4 to disallow (or deprecate) painting
> on widgets from outside of paint event handlers, so some of the tricks used
> in the old Qt 3 example won't work now.
>

Indeed. Also, QDesktopWidget is obsolete for Qt5.
I tried to send a QPaintEvent to QApplication, but got this:

StdErr: QWidget::paintEngine: Should no longer be called
QPainter::begin: Paint device returned engine == 0, type: 1


The same happens if I try to send that event to a new QWidget with
Qt.Desktop
set as windowFlag (which doesn't call the paintEvent itself anyway).
Creating a new QWidget with the QDesktopWidget as a parent doesn't work
either.

I seem to remember that it was (is?) possible to do it using Gtk along with
Cairo,
but that was more than 5 years ago.

Does anyone know if it's possible to draw on the root window on X11 via Qt
or,
at least, Python?

Thanks,
Maurizio

-- 
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.