Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawing on the X root window

Tags:

linux

x11

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.

like image 416
x10 Avatar asked Dec 19 '09 23:12

x10


1 Answers

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.

like image 85
liori Avatar answered Oct 12 '22 16:10

liori