VirtualBox

Changeset 56931 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 14, 2015 2:36:43 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: X11: 5978: Set transiency for mini-toolbar once, no need to do it every time.

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

Legend:

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

    r56870 r56931  
    261261                                              gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()),
    262262                                              gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    263     m_pMiniToolBar->addMenus(actionPool()->menus());
    264     connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()), Qt::QueuedConnection);
    265     connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    266             actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
    267     connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
    268             actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
    269     connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()),
    270             this, SLOT(sltRevokeFocus()), Qt::QueuedConnection);
     263    AssertPtrReturnVoid(m_pMiniToolBar);
     264    {
     265        /* Make sure mini-toolbar is always-on-top of machine-window: */
     266        VBoxGlobal::setTransientFor(m_pMiniToolBar, this);
     267        /* Configure mini-toolbar: */
     268        m_pMiniToolBar->addMenus(actionPool()->menus());
     269        connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()),
     270                this, SLOT(showMinimized()), Qt::QueuedConnection);
     271        connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
     272                actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger()));
     273        connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
     274                actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
     275        connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()),
     276                this, SLOT(sltRevokeFocus()), Qt::QueuedConnection);
     277    }
    271278}
    272279#endif /* !Q_WS_MAC */
     
    449456            VBoxGlobal::setFullScreenMonitorX11(m_pMiniToolBar, pFullscreenLogic->hostScreenForGuestScreen(m_uScreenId));
    450457        }
    451         /* Make sure mini-toolbar is always on top of machine-window: */
    452         VBoxGlobal::setTransientFor(m_pMiniToolBar, this);
    453458# endif /* Q_WS_X11 */
    454459    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r56870 r56931  
    144144                                              gEDataManager->miniToolbarAlignment(vboxGlobal().managedVMUuid()),
    145145                                              gEDataManager->autoHideMiniToolbar(vboxGlobal().managedVMUuid()));
    146     m_pMiniToolBar->show();
    147     m_pMiniToolBar->addMenus(actionPool()->menus());
    148     connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), this, SLOT(showMinimized()), Qt::QueuedConnection);
    149     connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
    150             actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
    151     connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
    152             actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
    153     connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()),
    154             this, SLOT(sltRevokeFocus()), Qt::QueuedConnection);
     146    AssertPtrReturnVoid(m_pMiniToolBar);
     147    {
     148        /* Make sure mini-toolbar is always-on-top of machine-window: */
     149        VBoxGlobal::setTransientFor(m_pMiniToolBar, this);
     150        /* Configure mini-toolbar: */
     151        m_pMiniToolBar->addMenus(actionPool()->menus());
     152        connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()),
     153                this, SLOT(showMinimized()), Qt::QueuedConnection);
     154        connect(m_pMiniToolBar, SIGNAL(sigExitAction()),
     155                actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger()));
     156        connect(m_pMiniToolBar, SIGNAL(sigCloseAction()),
     157                actionPool()->action(UIActionIndex_M_Application_S_Close), SLOT(trigger()));
     158        connect(m_pMiniToolBar, SIGNAL(sigNotifyAboutFocusStolen()),
     159                this, SLOT(sltRevokeFocus()), Qt::QueuedConnection);
     160    }
    155161}
    156162#endif /* !Q_WS_MAC */
     
    242248        /* Allow mini-toolbar to be located on full-screen area: */
    243249        m_pMiniToolBar->showMaximized();
    244         /* Make sure mini-toolbar is always on top of machine-window: */
    245         VBoxGlobal::setTransientFor(m_pMiniToolBar, this);
    246250# endif /* Q_WS_X11 */
    247251    }
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