File 0261-sync-before-reset-errorhandler.patch of Package libqt4

qt-bugs@ issue : 236401
Trolltech task ID : none
bugs.kde.org number : none
applied: no
author: Lubos Lunak <l.lunak@kde.org>

Sync X connection before resetting X error handler to the one provided
by Xlib (which just aborts), in case there are still queued requests
that may result in an error.


--- src/gui/kernel/qapplication_x11.cpp.sav	2008-10-20 21:07:11.000000000 +0200
+++ src/gui/kernel/qapplication_x11.cpp	2008-11-25 15:02:31.000000000 +0100
@@ -2312,6 +2312,8 @@ void qt_cleanup()
 #endif
 
     // Reset the error handlers
+    if (qt_is_gui_used)
+        XSync(X11->display, False); // sync first to process all possible errors
     XSetErrorHandler(original_x_errhandler);
     XSetIOErrorHandler(original_xio_errhandler);
openSUSE Build Service is sponsored by