on_exposure problem in custom widget



Hello,
I'm writing a widget for embeding xine in gtkmm apps 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;
}


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