Ignore:
Timestamp:
Feb 3, 2010, 12:06:04 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui/kernel: Fixed: Mouse press events replayed after closing the popup by clicking outside it had incorrect coordinates. This resulted into various kinds of misbehavior including spatial text selection in QTextEdit widgets after closing popups by clicking inside these widgets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qapplication_pm.cpp

    r498 r504  
    18981898            // in order to give non-Qt windows the opportunity to see mouse
    18991899            // messages while our popups are active we need to release the
    1900             // mouse capture which is absolute in OS/2. we do it directly
     1900            // mouse capture which is absolute in OS/2. e do it directly
    19011901            // (not through releaseAutoCapture()) in order to keep
    1902             // autoCaptureWnd nonzero to keep forwarding mouse move events
    1903             // (actually sent to one of Qt widgets) to the active popup.
     1902            // autoCaptureWnd nonzero
     1903            // to the active popup.
    19041904            autoCaptureReleased = true;
    19051905            WinSetCapture(HWND_DESKTOP, 0);
     
    19961996                if (!w->isActiveWindow())
    19971997                    w->activateWindow();
    1998                 POINTL pt = gpos;
    1999                 WinMapWindowPoints(HWND_DESKTOP, hwndTarget, &pt, 1);
     1998                POINTL ptl = gpos;
    20001999                // flip y coordinate
    2001                 pt.y = w->height() - (pt.y + 1);
     2000                ptl.y = QApplication::desktop()->height() - (ptl.y + 1);
     2001                WinMapWindowPoints(HWND_DESKTOP, hwndTarget, &ptl, 1);
    20022002                WinPostMsg(hwndTarget, qmsg.msg,
    2003                            MPFROM2SHORT(pt.x, pt.y), qmsg.mp2);
     2003                           MPFROM2SHORT(pt.y), qmsg.mp2);
    20042004            }
    20052005        }
Note: See TracChangeset for help on using the changeset viewer.