Changeset 15910 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 13, 2009 11:15:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r15185 r15910 591 591 if (ok) 592 592 max = winPos.section (',', 4, 4) == VBoxDefs::GUI_LastWindowPosition_Max; 593 if (ok && x > 0 && y > 0 /* to be sure it is not loaded out of the screen */) 594 { 595 QRect ar = QApplication::desktop()->availableGeometry (QPoint (x, y)); 596 597 /* Do some position checks */ 598 if (x < ar.left() || x > ar.right()) 599 x = ar.left(); 600 if (y < ar.top() || y > ar.bottom()) 601 y = ar.top(); 602 593 594 QRect ar = ok ? QApplication::desktop()->availableGeometry (QPoint (x, y)) : 595 QApplication::desktop()->availableGeometry (this); 596 597 if (ok /* previous parameters were read correctly */ 598 && (y > 0) && (y < ar.bottom()) /* check vertical bounds */ 599 && (x + w > ar.left()) && (x < ar.right()) /* & horizontal bounds */) 600 { 603 601 mNormalGeo.moveTo (x, y); 604 602 mNormalGeo.setSize (QSize (w, h).expandedTo (minimumSizeHint()) 605 603 .boundedTo (ar.size())); 606 604 setGeometry (mNormalGeo); 607 608 if (max) 609 /* maximize if needed */ 605 if (max) /* maximize if needed */ 610 606 showMaximized(); 611 607 } 612 608 else 613 609 { 614 QRect ar = QApplication::desktop()->availableGeometry (this);615 610 mNormalGeo.setSize (QSize (770, 550).expandedTo (minimumSizeHint()) 616 611 .boundedTo (ar.size()));
Note:
See TracChangeset
for help on using the changeset viewer.