Changeset 61850 in vbox
- Timestamp:
- Jun 23, 2016 12:46:21 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
- Files:
-
- 2 edited
-
UIMachineWindowFullscreen.cpp (modified) (4 diffs)
-
UIMachineWindowFullscreen.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r61748 r61850 23 23 # include <QMenu> 24 24 # include <QTimer> 25 # if def VBOX_WS_WIN25 # if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 26 26 # if QT_VERSION >= 0x050000 27 27 # include <QWindow> 28 28 # endif /* QT_VERSION >= 0x050000 */ 29 # endif /* VBOX_WS_WIN */29 # endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 30 30 31 31 /* GUI includes: */ … … 196 196 } 197 197 #endif /* VBOX_WS_MAC */ 198 199 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 200 void UIMachineWindowFullscreen::sltShowMinimized() 201 { 202 # if QT_VERSION < 0x050000 203 /* Minimize window: */ 204 showMinimized(); 205 # else /* QT_VERSION >= 0x050000 */ 206 # if defined(VBOX_WS_WIN) 207 /* Minimize window: */ 208 showMinimized(); 209 # else /* VBOX_WS_X11 */ 210 /* Minimize window and reset it's state to NONE: */ 211 setWindowState(Qt::WindowNoState); 212 windowHandle()->showMinimized(); 213 # endif /* VBOX_WS_X11 */ 214 # endif /* QT_VERSION >= 0x050000 */ 215 } 216 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 198 217 199 218 void UIMachineWindowFullscreen::prepareVisualState() … … 259 278 m_pMiniToolBar->addMenus(actionPool()->menus()); 260 279 connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), 261 this, SLOT(s howMinimized()), Qt::QueuedConnection);280 this, SLOT(sltShowMinimized()), Qt::QueuedConnection); 262 281 connect(m_pMiniToolBar, SIGNAL(sigExitAction()), 263 282 actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger())); … … 602 621 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 603 622 623 #ifdef VBOX_WS_X11 624 # if QT_VERSION >= 0x050000 625 void UIMachineWindowFullscreen::changeEvent(QEvent *pEvent) 626 { 627 /* Depending on event type: */ 628 switch (pEvent->type()) 629 { 630 case QEvent::WindowStateChange: 631 { 632 /* Restore necessary mode view on changing state from Minimized to None: */ 633 QWindowStateChangeEvent *pChangeEvent = static_cast<QWindowStateChangeEvent*>(pEvent); 634 if (pChangeEvent->oldState() == Qt::WindowMinimized && windowState() == Qt::WindowNoState) 635 showInNecessaryMode(); 636 break; 637 } 638 } 639 /* Call to base-class: */ 640 UIMachineWindow::changeEvent(pEvent); 641 } 642 # endif /* QT_VERSION >= 0x050000 */ 643 #endif /* VBOX_WS_X11 */ 644 604 645 #ifdef VBOX_WS_WIN 605 646 # if QT_VERSION >= 0x050000 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r61659 r61850 76 76 #endif /* RT_OS_DARWIN */ 77 77 78 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 79 /** Performs window minimization the tricky way. */ 80 void sltShowMinimized(); 81 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 82 78 83 private: 79 84 … … 101 106 void updateAppearanceOf(int iElement); 102 107 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 108 109 #ifdef VBOX_WS_X11 110 # if QT_VERSION >= 0x050000 111 /** Handles @a pEvent about state change. */ 112 void changeEvent(QEvent *pEvent); 113 # endif /* QT_VERSION >= 0x050000 */ 114 #endif /* VBOX_WS_X11 */ 103 115 104 116 #ifdef VBOX_WS_WIN
Note:
See TracChangeset
for help on using the changeset viewer.

