summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qdnd_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qdnd_win.cpp')
-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 {