summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-03-19 04:36:51 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-03-19 04:36:51 (GMT)
commit86ceda033eda6bd615134f71b9850081a0c808c9 (patch)
treedd4506f056f234e04ea66e0c4a8eeae23d389cda /src/gui
parenteaa1ba18e1db380bcacff1b7c41212a910da0550 (diff)
parentf9815142befe5fb312a6fea1dac43c33a3189145 (diff)
downloadQt-86ceda033eda6bd615134f71b9850081a0c808c9.zip
Qt-86ceda033eda6bd615134f71b9850081a0c808c9.tar.gz
Qt-86ceda033eda6bd615134f71b9850081a0c808c9.tar.bz2
Merge branch 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-master-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: Changes to driver workarounds. Switch to raster also when last window is destroyed (on MeeGo). Fix accidental population of the disk cache with partial content Fix disk cache interaction for range retrieval HTTP requests. Clipboard/Windows: Fix a hang when sending to non-responsive clients.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qclipboard_win.cpp15
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;