src/solaris/classes/sun/awt/X11/XErrorHandlerUtil.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 95,121 **** /** * Sets a synthetic error handler. Must be called with the acquired AWT lock. * @param handler the synthetic error handler to set */ public static void WITH_XERROR_HANDLER(XErrorHandler handler) { saved_error = null; current_error_handler = handler; } /** * Unsets a current synthetic error handler. Must be called with the acquired AWT lock. */ public static void RESTORE_XERROR_HANDLER() { - RESTORE_XERROR_HANDLER(true); - } - - private static void RESTORE_XERROR_HANDLER(boolean doXSync) { - if (doXSync) { // Wait until all requests are processed by the X server // and only then uninstall the error handler. XSync(); - } current_error_handler = null; } /** * Should be called under LOCK. --- 95,116 ---- /** * Sets a synthetic error handler. Must be called with the acquired AWT lock. * @param handler the synthetic error handler to set */ public static void WITH_XERROR_HANDLER(XErrorHandler handler) { + XSync(); saved_error = null; current_error_handler = handler; } /** * Unsets a current synthetic error handler. Must be called with the acquired AWT lock. */ public static void RESTORE_XERROR_HANDLER() { // Wait until all requests are processed by the X server // and only then uninstall the error handler. XSync(); current_error_handler = null; } /** * Should be called under LOCK.