Ignore:
Timestamp:
Feb 25, 2010, 4:31:14 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Fixed assertion at #1125 in qwidget.cpp (due to an attempt to re-instantiate QDesktopWidget during application termination).

File:
1 edited

Legend:

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

    r569 r603  
    284284    // first, process areas placed outside the screen bounds
    285285    if (flags & PWO_Screen) {
    286         RECTL rclScr = { 0, 0, QApplication::desktop()->width(),
    287                                QApplication::desktop()->height() };
     286        RECTL rclScr = { 0, 0, qt_display_width(), qt_display_height() };
    288287        WinMapWindowPoints(HWND_DESKTOP, hwnd, (PPOINTL) &rclScr, 2);
    289288        // rough check of whether some window part is outside bounds
     
    15401539    WinMapWindowPoints(internalWinId(), HWND_DESKTOP, &ptl, 1);
    15411540    // flip y (global) coordinate
    1542     ptl.y = QApplication::desktop()->height() - (ptl.y + 1);
     1541    ptl.y = qt_display_height() - (ptl.y + 1);
    15431542    return QPoint(ptl.x, ptl.y);
    15441543}
     
    15571556    ptl.x = pos.x();
    15581557    // flip y (global) coordinate
    1559     ptl.y = QApplication::desktop()->height() - (pos.y() + 1);
     1558    ptl.y = qt_display_height() - (pos.y() + 1);
    15601559    WinMapWindowPoints(HWND_DESKTOP, internalWinId(), &ptl, 1);
    15611560    // flip y (local) coordinate
     
    17561755                WinSetWindowPos(fId, HWND_TOP, r.left(),
    17571756                                // flip y coodrinate
    1758                                 QApplication::desktop()->height() - (r.top() + r.height()),
     1757                                qt_display_height() - (r.top() + r.height()),
    17591758                                r.width(), r.height(), fl);
    17601759            } else {
     
    21172116            data.crect.setRect(x, y, w, h);
    21182117        } else if (q->isWindow()) {
    2119             int sh = QApplication::desktop()->height();
     2118            int sh = qt_display_height();
    21202119            QRect fs(frameStrut());
    21212120            if (extra) {
     
    24082407    WinQueryWindowPos(data.winid, &cswp);
    24092408    // flip y coordinates
    2410     swp.y = QApplication::desktop()->height() - (swp.y + swp.cy);
     2409    swp.y = qt_display_height() - (swp.y + swp.cy);
    24112410    cswp.y = swp.cy - (cswp.y + cswp.cy);
    24122411    QRect &fs = top->frameStrut;
Note: See TracChangeset for help on using the changeset viewer.