Draw directly to the screen



Hi

My goal is to draw a line directly to the screen using gdk. "To the
screen" means that it should be visible for the user over any other
window.

I thin i have to use the root window to accomplish this

int main( int   argc,char *argv[] )
{
	gtk_init (&argc, &argv);

	GdkWindow* rw = gdk_get_default_root_window();
	GdkGC* gc = gdk_gc_new(rw);	
	gdk_draw_line(rw,gc,10,10,500,500);

	gdk_flush();

	gtk_main ();
	return 0;
}

However i dont see anything. I only can see the line if i shut down the
x-server. So I believe i only draw to the background even behind
nautilus. This seems logically but I cant find any other method to draw
directly to the screen.

If anyone has done this before or know how to do it I appreciate any
help
by
einKI




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]