开发者

Draw directly to the root window with PyCairo

I want to be able to draw directly to the root window in Python using Cairo. I have tested my code drawing on a fullscreened window, so I know that's not the issue. However, when I try to draw directly to the root window like so:

root = gtk.gdk.get_default_root_win开发者_如何学Godow()
cr = root.cairo_create()
...
# Drawing code here

nothing happens. The code runs fine, but nothing is ever drawn to the screen. Is there a way to do this, or do I need to overlay a transparent window on top of everything? (The issue with that solution is multi-monitor setups)


Virtual root window.

Note that KDE4 doesn't follow this convention. You need to find a child of the root window which has a property _NET_WM_WINDOW_TYPE set to _NET_WM_WINDOW_TYPE_DESKTOP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜