diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-12-11 14:18:37 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-12-11 14:18:37 (GMT) |
commit | f2321e217976042403adfb74bffa7dceffa6febd (patch) | |
tree | f0af69c7d362ac3a5e1c9b090053917c0a19c8a4 /src/gui/kernel/qapplication_x11.cpp | |
parent | 38181f227d3c35a543b1df5b5440ae3bac3b6513 (diff) | |
download | Qt-f2321e217976042403adfb74bffa7dceffa6febd.zip Qt-f2321e217976042403adfb74bffa7dceffa6febd.tar.gz Qt-f2321e217976042403adfb74bffa7dceffa6febd.tar.bz2 |
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
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 */ |