diff options
author | João Abecasis <joao@abecasis.name> | 2009-05-29 17:05:29 (GMT) |
---|---|---|
committer | João Abecasis <joao@abecasis.name> | 2009-06-02 08:42:58 (GMT) |
commit | d018549a25761b5e50d90939d94384f23d7a01e0 (patch) | |
tree | c96e5126cd38ca173bb8c18322f9a8c0d506ffcb /src/gui/kernel | |
parent | 5dca661dc78d8eb0489e7debf342a0869ae75a43 (diff) | |
download | Qt-d018549a25761b5e50d90939d94384f23d7a01e0.zip Qt-d018549a25761b5e50d90939d94384f23d7a01e0.tar.gz Qt-d018549a25761b5e50d90939d94384f23d7a01e0.tar.bz2 |
Fixes possible infinite loop in QApplication::topLevelAt
KDE Bug: https://bugs.kde.org/show_bug.cgi?id=191759
Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index a3c9406..12155f0 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -2955,10 +2955,10 @@ QWidget *QApplication::topLevelAt(const QPoint &p) Window wid = widget->internalWinId(); while (ctarget && !w) { X11->ignoreBadwindow(); - XTranslateCoordinates(X11->display, - QX11Info::appRootWindow(screen), - ctarget, x, y, &unused, &unused, &ctarget); - if (X11->badwindow()) + if (!XTranslateCoordinates(X11->display, + QX11Info::appRootWindow(screen), + ctarget, x, y, &unused, &unused, &ctarget) + || X11->badwindow()) break; if (ctarget == wid) { // Found! |