summaryrefslogtreecommitdiff
path: root/debian/patches/0261-sync-before-reset-errorhandler.patch
blob: 2128ba8b30d97d86a52a232dcb8414cf6950aa9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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.


--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -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);