On Wed, Aug 21, 2002, Stephen J. Turnbull wrote:
Ben> super*c*edes, yes...
Maybe in the OED, but not in Webster's. :-)
but it is in etc/BETA as SUPERCEDES, and I believe that's the dictionary
of choice, eh? :)
Ben> * event-Xt.c (drain_X_queue): loop over
Ben> while(XEventsQueued()) instead of
Ben> while(XtAppPending()&XtIMXEvent).
Have you tried the loop over devices with XtAppPending(), not
XEventsQueued()? (Yes/no answer is fine, I'm going to try it myself
anyway, despite my high regard for my own convenience. ;-)
no. What I submitted is the first thing I tried. I was going off a
post I saw somewhere that suggested a loop over Queued() insted of
Pending(). Since I have spent a cumulative grand total of *20* minutes
in the xemacs sources, I have no clue how that patch worked. It was a
shock to me, I was just trying to get something to compile after looking
at other examples in that file. see below...
I'm guessing that the reason that your patch "works" is
this:
+ struct device* d;
+ Display* display;
+ d = XDEVICE (XCAR (devcons));
+ if (DEVICE_X_P (d) && DEVICE_X_DISPLAY (d)) {
Ie, if the device goes down, XEmacs detects that and deletes it. Then
the if() fails (DEVICE_X_DISPLAY(d) is NULL), and we don't go into the
Xlib-of-no-return. If you know different, I'd like to hear about it.
;-)
The rationale here was that the device could be a tty, so we shouldn't
go around casting to an X display unless we know it's an X display.
+ struct device* d;
+ Display* display;
+ d = XDEVICE (XCAR (devcons));
+ if (DEVICE_X_P (d) && DEVICE_X_DISPLAY (d)) {
+ display = DEVICE_X_DISPLAY (d);
+ while (XEventsQueued (display, QueuedAfterReading))
+ XtAppProcessEvent (Xt_app_con, XtIMXEvent);
+ }
the DEVICE_X_DISPLAY(d) should not be used when dealing with a tty.
perhaps this *is* the reason my patch works, but as you asked, I never
tried it with anything else. Using Queued() in place of Pending() does
seem a little little bit safer to me (but I'm only guessing at the
semantics of the two functions). Anyway, please do try it with
Pending() if you want to, if you don't get around to it, let me know.
Thanks for following up!
hey, my pleasure! I would love to be a [small] part of the xemacs
project.
let me know if you want me to do anything,
Ben