1924 else { |
1924 else { |
1925 /* There must be a timer, alternate input, or signal event. */ |
1925 /* There must be a timer, alternate input, or signal event. */ |
1926 XtAppProcessEvent(awt_appContext, iMask & ~XtIMXEvent); |
1926 XtAppProcessEvent(awt_appContext, iMask & ~XtIMXEvent); |
1927 } |
1927 } |
1928 |
1928 |
1929 /* |
|
1930 ** Bug #4361799: Forte4J sometimes crashes on Solaris: |
|
1931 ** There is an underlying bug in Selection.c in Xt lib. |
|
1932 ** The routine HandleSelectionEvents, can call EndProtectedSection() |
|
1933 ** more than StartProtectedSection(), and then EndProtectedSection |
|
1934 ** will restore the default XError handler. As a result awt's |
|
1935 ** XError handler gets removed and we later crash on an XError. |
|
1936 ** |
|
1937 ** This happens when we call XtAppProcessEvent with event type 1e |
|
1938 ** (SelectionRequest) when running two copies of Forte |
|
1939 ** |
|
1940 ** XSetErrorHandler can safely be called repeatedly, so we are |
|
1941 ** fixing this with the sledgehammer, and resetting our XError |
|
1942 ** handler every time through the loop: |
|
1943 */ |
|
1944 { |
|
1945 extern int32_t xerror_handler(); |
|
1946 XSetErrorHandler(xerror_handler); |
|
1947 } |
|
1948 |
|
1949 } /* processOneEvent() */ |
1929 } /* processOneEvent() */ |
1950 |
1930 |
1951 /* |
1931 /* |
1952 * Waits for X/Xt events to appear on the pipe. Returns only when |
1932 * Waits for X/Xt events to appear on the pipe. Returns only when |
1953 * it is likely (but not definite) that there are events waiting to |
1933 * it is likely (but not definite) that there are events waiting to |