diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-17 20:12:13 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-17 20:12:13 (GMT) |
commit | 1811da78fc63371e2639a230e0aa81ed7f47695a (patch) | |
tree | b1e3e0024d94304e7be94640c0abeb5cf0c61ed6 /src/gui | |
parent | b8333bb969a2ac6b3917818bb95469f5f4d8dcb5 (diff) | |
parent | 3fb5fce61b6f64534ad292a78250e4256a6514b6 (diff) | |
download | Qt-1811da78fc63371e2639a230e0aa81ed7f47695a.zip Qt-1811da78fc63371e2639a230e0aa81ed7f47695a.tar.gz Qt-1811da78fc63371e2639a230e0aa81ed7f47695a.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Changes to driver workarounds.
Switch to raster also when last window is destroyed (on MeeGo).
Clipboard/Windows: Fix a hang when sending to non-responsive clients.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qclipboard_win.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gui/kernel/qclipboard_win.cpp b/src/gui/kernel/qclipboard_win.cpp index 52b9663..ea41165 100644 --- a/src/gui/kernel/qclipboard_win.cpp +++ b/src/gui/kernel/qclipboard_win.cpp @@ -52,6 +52,7 @@ #include "qt_windows.h" #include "qdnd_p.h" #include <private/qwidget_p.h> +#include <private/qsystemlibrary_p.h> QT_BEGIN_NAMESPACE @@ -70,6 +71,9 @@ void QtCeFlushClipboard(); #endif +typedef BOOL (WINAPI *PtrIsHungAppWindow)(HWND); + +static PtrIsHungAppWindow ptrIsHungAppWindow = 0; class QClipboardWatcher : public QInternalMimeData { public: @@ -327,9 +331,16 @@ bool QClipboard::event(QEvent *e) d->releaseIData(); propagate = true; } - if (propagate && d->nextClipboardViewer) { - SendMessage(d->nextClipboardViewer, m->message, m->wParam, m->lParam); + if (ptrIsHungAppWindow == 0) { + QSystemLibrary library(QLatin1String("User32")); + ptrIsHungAppWindow = (PtrIsHungAppWindow)library.resolve("IsHungAppWindow"); + } + if (ptrIsHungAppWindow && ptrIsHungAppWindow(d->nextClipboardViewer)) { + qWarning("%s: Cowardly refusing to send clipboard message to hung application...", Q_FUNC_INFO); + } else { + SendMessage(d->nextClipboardViewer, m->message, m->wParam, m->lParam); + } } return true; |