tags:

views:

137

answers:

1

I'd like to be able to draw on the root window in Linux. I.e. make an OSD.

I'm using Gnome.

Code samples or links to them would be appreciated.

+2  A: 

It is possible, but you will not see anything in GNOME. Nautilus, GNOME's file manager, opens its own window on top of root X window to display icons. Because of that the root X window is fully covered... so there is no point in drawing on it.

If you want to make OSD, either you should use a library like XOSD, or open your own X window and make it translucent. In fact, XOSD's source code should be a good example of how to do this.

Whole library seems to be implemented in one file: xosd.c.

liori
Thank you, your answer was most helpful.I'd like to draw things other than just text, but this is a fine starting point.
x10
Here's some sample code: http://pastebin.com/f58970b0c And a tutorial: http://ldots.org/xosd-guide/using_libxosd.html
x10