VirtualBox

Ignore:
Timestamp:
Jun 10, 2016 2:22:03 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8422: Runtime UI: Full-screen window: Clear window state on hiding, that allows us to properly expose window again on show; That way we forced to forget the minimized state, so storing separately.

File:
1 edited

Legend:

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

    r61585 r61659  
    6060    , m_fIsInFullscreenTransition(false)
    6161#endif /* VBOX_WS_MAC */
    62 {
    63 }
    64 
    65 void UIMachineWindowFullscreen::changeEvent(QEvent *pChangeEvent)
    66 {
    67     /* Overriding changeEvent for controlling mini-tool bar visibilty.
    68      * Hiding tool-bar when machine-window is minimized and show it in full-screen: */
    69 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    70     if (pChangeEvent->type() == QEvent::WindowStateChange)
    71     {
    72         /* If machine-window is in minimized mode: */
    73         if (isMinimized())
    74         {
    75             /* If there is a mini-toolbar: */
    76             if (m_pMiniToolBar)
    77             {
    78                 /* Hide mini-toolbar: */
    79                 m_pMiniToolBar->hide();
    80             }
    81         }
    82         /* If machine-window is in full-screen mode: */
    83         else
    84         {
    85             /* If there is a mini-toolbar: */
    86             if (m_pMiniToolBar)
    87             {
    88                 /* Show mini-toolbar in full-screen mode: */
    89                 m_pMiniToolBar->showFullScreen();
    90             }
    91         }
    92     }
    93 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */
    94 
    95     /* Call to base-class: */
    96     UIMachineWindow::changeEvent(pChangeEvent);
     62    , m_fWasMinimized(false)
     63{
    9764}
    9865
     
    451418        !pFullscreenLogic->hasHostScreenForGuestScreen(m_uScreenId))
    452419    {
    453         /* Hide window: */
     420        /* Remember whether the window was minimized: */
     421        if (isMinimized())
     422            m_fWasMinimized = true;
     423        /* Hide window and reset it's state to NONE: */
     424        setWindowState(Qt::WindowNoState);
    454425        hide();
     426        /* If there is mini-toolbar: */
     427        if (m_pMiniToolBar)
     428        {
     429            /* Hide mini-toolbar and reset it's state to NONE: */
     430            m_pMiniToolBar->setWindowState(Qt::WindowNoState);
     431            m_pMiniToolBar->hide();
     432        }
    455433    }
    456434    else
     
    489467        }
    490468#elif defined(VBOX_WS_WIN) || defined(VBOX_WS_X11)
    491         /* If machine-window is in minimized mode: */
    492         if (isMinimized())
    493         {
    494             /* Show window in minimized mode: */
     469        /* If there is mini-toolbar: */
     470        if (m_pMiniToolBar)
     471        {
     472            /* Show mini-toolbar: */
     473            m_pMiniToolBar->showFullScreen();
     474        }
     475        /* Show window: */
     476        showFullScreen();
     477        /* Restore minimized state if necessary: */
     478        if (m_fWasMinimized)
     479        {
     480            m_fWasMinimized = false;
    495481            showMinimized();
    496         }
    497         else
    498         {
    499             /* Show window in fullscreen mode: */
    500             showFullScreen();
    501482        }
    502483#endif /* VBOX_WS_WIN || VBOX_WS_X11 */
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