win->Release();
gint handle_button_press_event(GtkWidget *w, GdkEventButton * event, gpointer p){  nsMouseEvent mevent;  int b = 0;  /* Switch on single, double, triple click. */  switch (event->type) {  case GDK_BUTTON_PRESS:   /* Single click. */    switch (event->button)  /* Which button? */      {      case 1:        b = NS_MOUSE_LEFT_BUTTON_DOWN;        break;      case 2:        b = NS_MOUSE_MIDDLE_BUTTON_DOWN;        break;      case 3:        b = NS_MOUSE_RIGHT_BUTTON_DOWN;        break;      default:        /* Single-click default. */        b = NS_MOUSE_LEFT_BUTTON_DOWN;        break;      }    break;  case GDK_2BUTTON_PRESS:   /* Double click. */    switch (event->button)  /* Which button? */      {      case 1:        b = NS_MOUSE_LEFT_DOUBLECLICK;        break;      case 2:        b = NS_MOUSE_MIDDLE_DOUBLECLICK;        break;      case 3:        b = NS_MOUSE_RIGHT_DOUBLECLICK;        break;      default:        /* Double-click default. */        b = NS_MOUSE_LEFT_DOUBLECLICK;        break;      }    break;  case GDK_3BUTTON_PRESS:   /* Triple click. */    /* Unhandled triple click. */    break;  default:    break;  }  InitMouseEvent(event, p, mevent, b);  nsWindow *win = (nsWindow *)p;  win->DispatchMouseEvent(mevent);  UninitMouseEvent(event, p, mevent, b);  return PR_TRUE;}