jdk/src/solaris/native/sun/awt/awt_MToolkit.c
changeset 2802 d05a9dcc8296
parent 1175 026b52c440fe
child 2810 fa49c6a06baf
equal deleted inserted replaced
2760:f038acdbdf9c 2802:d05a9dcc8296
  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