VirtualBox

Changeset 59507 in vbox


Ignore:
Timestamp:
Jan 28, 2016 12:58:06 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7839: Extra-Data Manager: Position off-screen windows to be fully visible again on relaunch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r59094 r59507  
    23192319                                          vboxGlobal().availableGeometry();
    23202320
     2321    /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
     2322#ifdef Q_WS_WIN
    23212323    /* Make sure resulting geometry is within current bounds: */
    2322     geometry = geometry.intersected(availableGeometry);
     2324    if (fOk && geometry.intersects(availableGeometry))
     2325        geometry.moveCenter(availableGeometry.center());
     2326#endif /* Q_WS_WIN */
    23232327
    23242328    /* Move default-geometry to screen-geometry' center: */
     
    35233527        geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
    35243528
    3525     /* Get screen-geometry [of screen with point (iX, iY) if possible]: */
     3529    /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
     3530#ifdef Q_WS_WIN
     3531    /* Get available-geometry [of screen with point (iX, iY) if possible]: */
    35263532    const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
    35273533                                          vboxGlobal().availableGeometry();
    35283534
    35293535    /* Make sure resulting geometry is within current bounds: */
    3530     geometry = geometry.intersected(availableGeometry);
     3536    if (fOk && geometry.intersects(availableGeometry))
     3537        geometry.moveCenter(availableGeometry.center());
     3538#endif /* Q_WS_WIN */
    35313539
    35323540    /* Move default-geometry to pParentWidget' geometry center: */
     
    36753683        geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
    36763684
    3677     /* Get screen-geometry [of screen with point (iX, iY) if possible]: */
     3685    /* Get available-geometry [of screen with point (iX, iY) if possible]: */
    36783686    const QRect availableGeometry = fOk ? vboxGlobal().availableGeometry(QPoint(iX, iY)) :
    36793687                                          vboxGlobal().availableGeometry();
    36803688
     3689    /* In Windows Qt fails to reposition out of screen window properly, so moving to centre: */
     3690#ifdef Q_WS_WIN
    36813691    /* Make sure resulting geometry is within current bounds: */
    3682     geometry = geometry.intersected(availableGeometry);
     3692    if (fOk && geometry.intersects(availableGeometry))
     3693        geometry.moveCenter(availableGeometry.center());
     3694#endif /* Q_WS_WIN */
    36833695
    36843696    /* Move default-geometry to current screen center: */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette