Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qdnd_win.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    516516//                    IDropSource Methods
    517517//---------------------------------------------------------------------
    518 STDMETHODIMP
     518QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
    519519QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState)
    520520{
     
    525525    if (fEscapePressed) {
    526526        return ResultFromScode(DRAGDROP_S_CANCEL);
    527     } else if (!(grfKeyState & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON))) {
     527    } else if ((GetAsyncKeyState(VK_LBUTTON) == 0)
     528        && (GetAsyncKeyState(VK_MBUTTON) == 0)
     529        && (GetAsyncKeyState(VK_RBUTTON) == 0))    {
     530        // grfKeyState is broken on CE & some Windows XP versions,
     531        // therefore we need to check the state manually
    528532        return ResultFromScode(DRAGDROP_S_DROP);
    529533    } else {
    530 #if defined(Q_OS_WINCE)
    531         // grfKeyState is broken on CE, therefore need to check
    532         // the state manually
    533         if ((GetAsyncKeyState(VK_LBUTTON) == 0) &&
    534             (GetAsyncKeyState(VK_MBUTTON) == 0) &&
    535             (GetAsyncKeyState(VK_RBUTTON) == 0)) {
    536             return ResultFromScode(DRAGDROP_S_DROP);
    537         }
    538 #else
     534#if !defined(Q_OS_WINCE)
    539535        if (currentButtons == Qt::NoButton) {
    540536            currentButtons = keystate_to_mousebutton(grfKeyState);
     
    550546}
    551547
    552 STDMETHODIMP
     548QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
    553549QOleDropSource::GiveFeedback(DWORD dwEffect)
    554550{
     
    631627//---------------------------------------------------------------------
    632628
    633 STDMETHODIMP
     629QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
    634630QOleDropTarget::DragEnter(LPDATAOBJECT pDataObj, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
    635631{
     
    693689}
    694690
    695 STDMETHODIMP
     691QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
    696692QOleDropTarget::DragOver(DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
    697693{
     
    763759}
    764760
    765 STDMETHODIMP
     761QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
    766762QOleDropTarget::DragLeave()
    767763{
     
    790786#define KEY_STATE_BUTTON_MASK (MK_LBUTTON | MK_MBUTTON | MK_RBUTTON)
    791787
    792 STDMETHODIMP
     788QT_ENSURE_STACK_ALIGNED_FOR_SSE STDMETHODIMP
    793789QOleDropTarget::Drop(LPDATAOBJECT /*pDataObj*/, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect)
    794790{
Note: See TracChangeset for help on using the changeset viewer.