Re: Draw directly to the screen

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

 



If you add the line

gdk_gc_set_subwindow (gc, GDK_INCLUDE_INFERIORS);

after you create the gc, then it should draw over all child windows.

Regards,

Ian King
Eiffel Software

einKI.ml wrote:
> 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
>
> _______________________________________________
> 
> gtk-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
>   

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux