VirtualBox

Changeset 27424 in vbox


Ignore:
Timestamp:
Mar 16, 2010 7:48:42 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58900
Message:

FE/Qt4: New running VM core: seamless mode is now taking into account situation when machine-view was not resized to full machine-window size and seamless mask requires some shift.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r27374 r27424  
    5757    CSession& session() const;
    5858
     59    /* Public members: */
    5960    virtual void reshow() {}
     61    virtual void setMask(const QRegion &region) { machineWindow()->setMask(region); }
    6062
    6163protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r27415 r27424  
    158158            {
    159159                m_lastVisibleRegion = pSetRegionEvent->region();
    160                 machineWindowWrapper()->machineWindow()->setMask(m_lastVisibleRegion);
     160                machineWindowWrapper()->setMask(m_lastVisibleRegion);
    161161            }
    162162            return true;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r27421 r27424  
    356356    QRegion region = constRegion;
    357357
     358    /* Shift region if left spacer width is NOT zero or top spacer height is NOT zero: */
     359    if (m_pLeftSpacer->geometry().width() || m_pTopSpacer->geometry().height())
     360        region.translate(m_pLeftSpacer->geometry().width(), m_pTopSpacer->geometry().height());
     361
    358362#if 0 // TODO: Is it really needed now?
    359363    /* The global mask shift cause of toolbars and such things. */
     
    361365#endif
    362366
    363     /* Including mini tool-bar area */
    364     QRegion toolBarRegion(m_pMiniToolBar->mask());
    365     toolBarRegion.translate(m_pMiniToolBar->mapToGlobal(toolBarRegion.boundingRect().topLeft()) - QPoint(1, 0));
    366     region += toolBarRegion;
     367    /* Including mini tool-bar area: */
     368    if (m_pMiniToolBar)
     369    {
     370        QRegion toolBarRegion(m_pMiniToolBar->mask());
     371        toolBarRegion.translate(m_pMiniToolBar->mapToGlobal(toolBarRegion.boundingRect().topLeft()) - QPoint(1, 0));
     372        region += toolBarRegion;
     373    }
    367374
    368375#if 0 // TODO: Is it really needed now?
     
    432439}
    433440
    434 void UIMachineWindowSeamless::clearMask()
    435 {
    436 #ifdef Q_WS_WIN
    437     SetWindowRgn(winId(), 0, TRUE);
    438 #else
    439     QMainWindow::clearMask();
    440 #endif
    441 }
    442 
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h

    r27375 r27424  
    101101    void showSeamless();
    102102    void setMask(const QRegion &region);
    103     void clearMask();
    104103
    105104    /* Private variables: */
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