VirtualBox

Changeset 57067 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 24, 2015 10:57:41 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Action-pool: Fixing sync issue for the case of switching between two modes with multi-screen layout.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp

    r56917 r57067  
    18571857void UIActionPoolRuntime::setMultiScreenLayout(UIMultiScreenLayout *pMultiScreenLayout)
    18581858{
    1859     /* Disconnect old stuff: */
    1860     if (m_pMultiScreenLayout)
    1861     {
    1862         disconnect(this, SIGNAL(sigNotifyAboutTriggeringViewScreenRemap(int, int)),
    1863                    m_pMultiScreenLayout, SLOT(sltHandleScreenLayoutChange(int, int)));
    1864         disconnect(m_pMultiScreenLayout, SIGNAL(sigScreenLayoutUpdate()),
    1865                    this, SLOT(sltHandleScreenLayoutUpdate()));
    1866     }
     1859    /* Do not allow NULL pointers: */
     1860    AssertPtrReturnVoid(pMultiScreenLayout);
    18671861
    18681862    /* Assign new multi-screen layout: */
     
    18701864
    18711865    /* Connect new stuff: */
    1872     if (m_pMultiScreenLayout)
    1873     {
    1874         connect(this, SIGNAL(sigNotifyAboutTriggeringViewScreenRemap(int, int)),
    1875                 m_pMultiScreenLayout, SLOT(sltHandleScreenLayoutChange(int, int)));
    1876         connect(m_pMultiScreenLayout, SIGNAL(sigScreenLayoutUpdate()),
    1877                 this, SLOT(sltHandleScreenLayoutUpdate()));
    1878     }
     1866    connect(this, SIGNAL(sigNotifyAboutTriggeringViewScreenRemap(int, int)),
     1867            m_pMultiScreenLayout, SLOT(sltHandleScreenLayoutChange(int, int)));
     1868    connect(m_pMultiScreenLayout, SIGNAL(sigScreenLayoutUpdate()),
     1869            this, SLOT(sltHandleScreenLayoutUpdate()));
     1870
     1871    /* Invalidate View menu: */
     1872    m_invalidations << UIActionIndexRT_M_View;
     1873}
     1874
     1875void UIActionPoolRuntime::unsetMultiScreenLayout(UIMultiScreenLayout *pMultiScreenLayout)
     1876{
     1877    /* Do not allow NULL pointers: */
     1878    AssertPtrReturnVoid(pMultiScreenLayout);
     1879
     1880    /* Disconnect old stuff: */
     1881    disconnect(this, SIGNAL(sigNotifyAboutTriggeringViewScreenRemap(int, int)),
     1882               pMultiScreenLayout, SLOT(sltHandleScreenLayoutChange(int, int)));
     1883    disconnect(pMultiScreenLayout, SIGNAL(sigScreenLayoutUpdate()),
     1884               this, SLOT(sltHandleScreenLayoutUpdate()));
     1885
     1886    /* Unset old multi-screen layout: */
     1887    if (m_pMultiScreenLayout == pMultiScreenLayout)
     1888        m_pMultiScreenLayout = 0;
    18791889
    18801890    /* Invalidate View menu: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h

    r56098 r57067  
    154154      * @note For menus which uses it to build contents. */
    155155    void setMultiScreenLayout(UIMultiScreenLayout *pMultiScreenLayout);
     156    /** Undefines UI multi-screen layout object reference.
     157      * @note For menus which uses it to build contents. */
     158    void unsetMultiScreenLayout(UIMultiScreenLayout *pMultiScreenLayout);
    156159    /** Returns UI multi-screen layout object reference. */
    157160    UIMultiScreenLayout* multiScreenLayout() const { return m_pMultiScreenLayout; }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r56126 r57067  
    6161{
    6262    /* Delete multiscreen layout: */
    63     actionPool()->toRuntime()->setMultiScreenLayout(0);
     63    actionPool()->toRuntime()->unsetMultiScreenLayout(m_pScreenLayout);
    6464    delete m_pScreenLayout;
    6565}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r56126 r57067  
    5959{
    6060    /* Delete multiscreen layout: */
    61     actionPool()->toRuntime()->setMultiScreenLayout(0);
     61    actionPool()->toRuntime()->unsetMultiScreenLayout(m_pScreenLayout);
    6262    delete m_pScreenLayout;
    6363}
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