event.eventStructType = NS_GUI_EVENT;  event.time = 0; event.point.x = 0; event.point.y = 0;  NS_ADDREF(widget);  nsEventStatus status; widget->DispatchEvent(&event, status);  NS_RELEASE(widget);
gint handle_toplevel_focus_out(GtkWidget *      aWidget,                                GdkEventFocus *  aGdkFocusEvent,                                gpointer         aData){#ifdef DEBUG_saari  printf("handle_toplevel_focus_out\n");  printf("... send NS_DEACTIVATE\n");#endif  gJustGotDeactivate = PR_TRUE;  if (!aWidget) {    return PR_TRUE;  }    if (!aGdkFocusEvent) {    return PR_TRUE;  }  nsWidget *widget = (nsWidget *) aData;  if (!widget) {    return PR_TRUE;  }#ifdef USE_XIM  widget->IMEDeactivateWidget();#endif // USE_XIM   // Dispatch NS_DEACTIVATE  nsGUIEvent event;    event.message = NS_DEACTIVATE;  event.widget  = widget;  event.eventStructType = NS_GUI_EVENT;  event.time = 0;  event.point.x = 0;  event.point.y = 0;  NS_ADDREF(widget);  nsEventStatus status;  widget->DispatchEvent(&event, status);    NS_RELEASE(widget);    return PR_TRUE;}