From f2321e217976042403adfb74bffa7dceffa6febd Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 11 Dec 2009 15:18:37 +0100 Subject: Don't react to X errors on displays that are not the Qt display. Even though Qt doesn't support multiple displays, it is possible for people to have code that uses multiple displays (either by using Xlib directly or when integrating with another toolkit). Task-number: QTBUG-3337 --- src/gui/kernel/qapplication_x11.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index b71ae73..eb35c10 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -614,6 +614,11 @@ static int (*original_xio_errhandler)(Display *dpy); static int qt_x_errhandler(Display *dpy, XErrorEvent *err) { + if (X11->display != dpy) { + // only handle X errors for our display + return 0; + } + switch (err->error_code) { case BadAtom: if (err->request_code == 20 /* X_GetProperty */ -- cgit v0.12