Broken XNextEvent()(libX11 1.1.2 - 1.1.5)
Fumihito YOSHIDA
fumihito.yoshida at gmail.com
Tue Sep 30 03:06:34 PDT 2008
Hi walter,
> i am not an expenrt on xorg internal but why not add
> if (!XPending()) return; to XNextEvent(); ?
It is very smart. But it is not backward-compatible(maybe).
XNextEvent() difiniton is
| int XNextEvent(Display *display, XEvent *event_return);
and, typicial classical loop is below.
(it from IIIMF/iiimxcf/htt_xbe/src/watchdog.c);
| for (;;) {
| XNextEvent(display, &ev);
| switch (ev.type) {
In old days, XNextEvent *must* return valid(significant) XEvent value,
if we add "if (!XPending()) return;",
I think that it cause unpredictable side-effects, isn't it?
Regards,
More information about the xorg
mailing list