Esempio n. 1
0
void xtbin::xtbin_destroy() {
  sync();
  XtUnregisterDrawable(xtdisplay, xtwindow);
  sync();
  xtwidget->core.window = oldwindow;
  XtUnrealizeWidget(xtwidget);
  initialized = False;
}
Esempio n. 2
0
File: Core.c Progetto: aosm/X11libs
static void CoreDestroy (
     Widget    widget)
{
    _XtFreeEventTable(&widget->core.event_table);
    _XtDestroyTMData(widget);
    XtUnregisterDrawable(XtDisplay(widget), widget->core.window);

    if (widget->core.popup_list != NULL)
        XtFree((char *)widget->core.popup_list);

} /* CoreDestroy */
Esempio n. 3
0
static void
xt_client_unrealize ( XtClient* xtclient )
{
#if XlibSpecificationRelease >= 6
  XtUnregisterDrawable(xtclient->xtdisplay,
                       xtclient->top_widget->core.window);
#else
  _XtUnregisterWindow(xtclient->top_widget->core.window,
                      xtclient->top_widget);
#endif

  /* flush the queue before we returning origin top_widget->core.window
     or we can get X error since the window is gone */
  XSync(xtclient->xtdisplay, False);

  xtclient->top_widget->core.window = xtclient->oldwindow;
  XtUnrealizeWidget(xtclient->top_widget);
}
Esempio n. 4
0
static void UnrealizeWidget(
    Widget		widget)
{
    CompositeWidget	cw;
    Cardinal		i;
    WidgetList		children;

    if (!XtIsWidget(widget) || !XtIsRealized(widget)) return;

    /* If this is the application's popup shell, unmap it? */
    /* no, the window is being destroyed */

    /* Recurse on children */
    if (XtIsComposite (widget)) {
        cw = (CompositeWidget) widget;
        children = cw->composite.children;
        /* Unrealize all children */
        for (i = cw->composite.num_children; i != 0; --i) {
            UnrealizeWidget (children[i-1]);
        }
        /* Unmap children that are managed and mapped_when_managed? */
        /* No, it's ok to be managed and unrealized as long as your parent */
        /* is unrealized. XtUnrealize widget makes sure the "top" widget */
        /* is unmanaged, we can ignore all descendents */
    }

    if (XtHasCallbacks(widget, XtNunrealizeCallback) == XtCallbackHasSome)
        XtCallCallbacks(widget, XtNunrealizeCallback, NULL);

    /* Unregister window */
    XtUnregisterDrawable(XtDisplay(widget), XtWindow(widget));

    /* Remove Event Handlers */
    /* remove grabs. Happens automatically when window is destroyed. */

    /* Destroy X Window, done at outer level with one request */
    widget->core.window = None;

    /* Removing the event handler here saves having to keep track if
     * the translation table is changed while the widget is unrealized.
     */
    _XtRemoveTranslations(widget);
} /* UnrealizeWidget */
Esempio n. 5
0
void
xt_client_unrealize ( XtClient* xtclient )
{
  /* Explicitly destroy the child_widget window because this is actually a
     child of the socket window.  It is not a child of top_widget's window
     when that is destroyed. */
  XtUnrealizeWidget(xtclient->child_widget);

#if XlibSpecificationRelease >= 6
  XtUnregisterDrawable(xtclient->xtdisplay,
                       xtclient->top_widget->core.window);
#else
  _XtUnregisterWindow(xtclient->top_widget->core.window,
                      xtclient->top_widget);
#endif

  /* flush the queue before we returning origin top_widget->core.window
     or we can get X error since the window is gone */
  XSync(xtclient->xtdisplay, False);

  xtclient->top_widget->core.window = xtclient->oldwindow;
  XtUnrealizeWidget(xtclient->top_widget);
}