Ar an dara lá de mí Márta, scríobh Stephen J. Turnbull:
Have you read the documentation of those functions? If so you'd
realize
that they are a typically Xian fragile kludge to cover up for a design
flaw years after it became irreversible.<wink>
Seriously, now: have you protected against this?
If the drawable is already registered with another widget, or if the
drawable is the window of a widget in the client's widget tree, the
results of calling XtRegisterDrawable are undefined.
XtUnregisterDrawable removes an association created with
XtRegisterDrawable. If the drawable is the window of a widget
in the client's widget tree the results of calling
XtUnregisterDrawable are undefined.
"Undefined" in X usually means "you're going down, sucker" to
XEmacs.
The protection was there already:
if (x_window_to_frame (d, window)) /* #### debug */
invalid_operation ("attempt to transfer an INCR to ourself!",
Qunbound);
As such, `window' always belongs to another app, and cannot be in the
client’s widget tree. Since all the window hash table manipulation in
xc/lib/Xt/Event.c is in the client’s address spece, with no calls to X11 to
get widget trees from other apps, “already registered with another widget”
as that doc puts it, doesn’t have anything to do with other Xt apps.
--
“I, for instance, am gung-ho about open source because my family is being
held hostage in Rob Malda’s basement. But who fact-checks me, or Enderle,
when we say something in public? No-one!” -- Danny O’Brien