Timestamp:
Aug 20, 2009, 12:19:08 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Don't change top level window size/position in Qt when it gets minimized (makes it similar to other platforms like Windows).

File:
1 edited

Legend:

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

    r121 r122  
    14111411                    }
    14121412                } else {
    1413                     d->updateFrameStrut();
     1413                    // @todo most likely, we don't need this as in PM the frame
     1414                    // strut seems to never change during window lifetime
     1415//                  d->updateFrameStrut();
    14141416                }
    14151417            }
     
    18211823                if (!q->isVisible())
    18221824                    WinInvalidateRect(q->internalWinId(), NULL, FALSE);
    1823 
    1824                 // If the layout has heightForWidth, the WinSetWindowPos() above can
    1825                 // change the size/position, so refresh them.
    1826                 WinQueryWindowPos(fId, &swp);
    1827                 // flip y coordinate
    1828                 swp.y = sh - (swp.y + swp.cy);
    1829                 QRect fs(frameStrut());
    1830                 data.crect.setRect(swp.x + fs.left(),
    1831                                    swp.y + fs.top(),
    1832                                    swp.cx - fs.left() - fs.right(),
    1833                                    swp.cy - fs.top() - fs.bottom());
    1834                 isResize = data.crect.size() != oldSize;
     1825                if (!(swp.fl & SWP_MINIMIZE)) {
     1826                    // If the layout has heightForWidth, the WinSetWindowPos() above can
     1827                    // change the size/position, so refresh them. Note that if the
     1828                    // widget is minimized, we don't update its size in Qt (see
     1829                    // QApplication::translateConfigEvent()).
     1830                    WinQueryWindowPos(fId, &swp);
     1831                    // flip y coordinate
     1832                    swp.y = sh - (swp.y + swp.cy);
     1833                    QRect fs(frameStrut());
     1834                    data.crect.setRect(swp.x + fs.left(),
     1835                                       swp.y + fs.top(),
     1836                                       swp.cx - fs.left() - fs.right(),
     1837                                       swp.cy - fs.top() - fs.bottom());
     1838                    isResize = data.crect.size() != oldSize;
     1839                }
    18351840            } else {
    18361841                q->setAttribute(Qt::WA_OutsideWSRange, false);
Note: See TracChangeset for help on using the changeset viewer.