GtkDrawingArea weirdness ...



Why does GtkDrawingArea do an override set on expose_event?  In the following
snippet of code:


  gtk_signal_connect(GTK_OBJECT(wv->da),"expose_event",
		     (GtkSignalFunc) waveviewer_da_expose, wv);

  /* FIXME: Ask why I have to set the event mask manually to */
  /* get the signals I want */

#define CURSOR_MASK (GDK_ENTER_NOTIFY_MASK | 
                     GDK_LEAVE_NOTIFY_MASK | 
                     GDK_POINTER_MOTION_MASK)

  old_mask = gtk_widget_get_events (GTK_WIDGET (wv->da));
  gtk_widget_set_events(GTK_WIDGET(wv->da), old_mask | CURSOR_MASK);

  gtk_signal_connect(GTK_OBJECT(wv->da),"enter_notify_event",
  		     (GtkSignalFunc) waveviewer_da_enter, wv);

  gtk_signal_connect(GTK_OBJECT(wv->da),"motion_notify_event",
		     (GtkSignalFunc) waveviewer_da_motion, wv);

  gtk_signal_connect(GTK_OBJECT(wv->da),"leave_notify_event",
		     (GtkSignalFunc) waveviewer_da_leave, wv);

The expose_event should get shut off, but it doesn't.

Why?

Andy Lentvorski



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