summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-22 16:16:01 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-23 12:04:15 (GMT)
commit35c3fa47082d6d580a9f1cfe0543e2d443f00d95 (patch)
tree3b278e488347f56628e8cd0cf318e234b713d2c4 /src
parent7986ab58b9a5d0828291c857d3ce86bfa1af4e6e (diff)
downloadQt-35c3fa47082d6d580a9f1cfe0543e2d443f00d95.zip
Qt-35c3fa47082d6d580a9f1cfe0543e2d443f00d95.tar.gz
Qt-35c3fa47082d6d580a9f1cfe0543e2d443f00d95.tar.bz2
Drag & drop operations wont end while using Remote Desktop sessions
The button state passed in the OleDropSource::QueryContinueDrag() contains wrong information. We need to query the state of individual buttons like we do in Windows CE. Task-number: QTBUG-6604 Reviewed-by: Denis
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qdnd_win.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp
index 0742a93..a164c2a 100644
--- a/src/gui/kernel/qdnd_win.cpp
+++ b/src/gui/kernel/qdnd_win.cpp
@@ -524,18 +524,14 @@ QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
if (fEscapePressed) {
return ResultFromScode(DRAGDROP_S_CANCEL);
- } else if (!(grfKeyState & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON))) {
+ } else if ((GetAsyncKeyState(VK_LBUTTON) == 0)
+ && (GetAsyncKeyState(VK_MBUTTON) == 0)
+ && (GetAsyncKeyState(VK_RBUTTON) == 0)) {
+ // grfKeyState is broken on CE & some Windows XP versions,
+ // therefore we need to check the state manually
return ResultFromScode(DRAGDROP_S_DROP);
} else {
-#if defined(Q_OS_WINCE)
- // grfKeyState is broken on CE, therefore need to check
- // the state manually
- if ((GetAsyncKeyState(VK_LBUTTON) == 0) &&
- (GetAsyncKeyState(VK_MBUTTON) == 0) &&
- (GetAsyncKeyState(VK_RBUTTON) == 0)) {
- return ResultFromScode(DRAGDROP_S_DROP);
- }
-#else
+#if !defined(Q_OS_WINCE)
if (currentButtons == Qt::NoButton) {
currentButtons = keystate_to_mousebutton(grfKeyState);
} else {