Skip to content
Advertisement

Drawing on the X root window

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.

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement