Re: on_exposure problem in custom widget



On Sat, 2005-03-05 at 17:37 +0100, David Sillou wrote:
> Hello,
> I'm writing a widget for embeding xine in gtkmm apps

I believe that totem has such a widget already, in C.

>  and it now works almost fine but there is still a problem i can't get
> trough: when the on_exposure_event method is called, I pass the info
> to  xine that handles it correctly (and redraw video image) but,
> unfortunately, when  on_exposure_event is left, the widget's
> background is redrawn in rectangle that  needed to be refreshed. Looks
> like another handler is called with the same event after leaving
> on_exposure_event ...
> 
> Could someone please help me.
> 
> DAve 
> 
> bool gtXine::on_expose_event(GdkEventExpose* event )
> {
>   std::cout << "exposure fired" <<std::endl;
>   if (event->count != 0)     return FALSE;  
> 
>   XExposeEvent *expose=new XExposeEvent;
>   memset(expose, 0, sizeof(XExposeEvent));
>   // expose->count is now 0;
>     
>    if (m_stream) xine_gui_send_vo_data(m_stream,
> XINE_GUI_SEND_EXPOSE_EVENT,         (void *) expose);
>   
>    sleep(5) // for tetsing purpose --> the rendering is now correct
> for the sleeping time
>   
>   delete expose; 
>   
>   return true;
> }
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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