Re: Q: how to stop a drawingarea from being drawn?



I may be wrong here but try this

Set the return value of the signal handler to gboolean

example:
gboolean gtkwin_draw(GtkWidget * widget, GdkEventExpose *event, mystruct *s)

And set the return value to TRUE

I believe TRUE means that you handled all the drawing and it should not be 
forwarded to the default method.

Kevin


On Friday 20 February 2004 09:09 am, Johan Knol wrote:
Hi All,

I have an empty drawingarea (live_display.image) who's xwinid I pass on
to SDL:

   // set the env var for SDL to embed in
   live_display.xwinid=GDK_WINDOW_XWINDOW(live_display.image->window);
   sprintf (env, "SDL_WINDOWID=%d", live_display.xwinid);
   putenv(env);

   // Initialize the SDL library (video subsystem)
   if ( SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) == -1) {
     fprintf(stderr,"Couldn't initialize SDL video subsystem\n");
     return(0);
   }

That works *perfectly*. However, every resize of its toplevel parent
sends a "draw" signal that clears the drawingarea (because it's empty)
and after that SDL refreshes it. That causes an anoying flickering. I
can connect to that signal, but since the signal function returns void,
how do I prevent that from happening?

TIA
Johan

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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