Changeset 65800 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 16, 2017 1:20:32 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113533
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r65520 r65800 61 61 , m_fWasMinimized(false) 62 62 #ifdef VBOX_WS_X11 63 , m_fIsMinimizationRequested(false) 63 64 , m_fIsMinimized(false) 64 65 #endif … … 136 137 void UIMachineWindowFullscreen::sltRevokeWindowActivation() 137 138 { 139 #ifdef VBOX_WS_X11 140 // WORKAROUND: 141 // We could be asked to minimize already, but just 142 // not yet executed that order to current moment. 143 if (m_fIsMinimizationRequested) 144 return; 145 #endif 146 138 147 /* Make sure window is visible: */ 139 148 if (!isVisible() || isMinimized()) … … 198 207 } 199 208 #endif /* VBOX_WS_MAC */ 209 210 void UIMachineWindowFullscreen::sltShowMinimized() 211 { 212 #ifdef VBOX_WS_X11 213 /* Remember that we are asked to minimize: */ 214 m_fIsMinimizationRequested = true; 215 #endif 216 217 showMinimized(); 218 } 200 219 201 220 void UIMachineWindowFullscreen::prepareVisualState() … … 261 280 m_pMiniToolBar->addMenus(actionPool()->menus()); 262 281 connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), 263 this, SLOT(s howMinimized()), Qt::QueuedConnection);282 this, SLOT(sltShowMinimized()), Qt::QueuedConnection); 264 283 connect(m_pMiniToolBar, SIGNAL(sigExitAction()), 265 284 actionPool()->action(UIActionIndexRT_M_View_T_Fullscreen), SLOT(trigger())); … … 564 583 LogRel2(("GUI: UIMachineWindowFullscreen::changeEvent: Window restored\n")); 565 584 m_fIsMinimized = false; 585 /* Remember that we no more asked to minimize: */ 586 m_fIsMinimizationRequested = false; 566 587 showInNecessaryMode(); 567 588 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r65520 r65800 76 76 #endif /* RT_OS_DARWIN */ 77 77 78 /** Shows window in minimized state. */ 79 void sltShowMinimized(); 80 78 81 private: 79 82 … … 128 131 bool m_fWasMinimized; 129 132 #ifdef VBOX_WS_X11 133 /** X11: Holds whether the window minimization is currently requested. 134 * Used to prevent accidentally restoring to full-screen state. */ 135 bool m_fIsMinimizationRequested; 130 136 /** X11: Holds whether the window is currently minimized. 131 137 * Used to restore full-screen state when the window restored again. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r65520 r65800 53 53 , m_fWasMinimized(false) 54 54 #ifdef VBOX_WS_X11 55 , m_fIsMinimizationRequested(false) 55 56 , m_fIsMinimized(false) 56 57 #endif … … 70 71 void UIMachineWindowSeamless::sltRevokeWindowActivation() 71 72 { 73 #ifdef VBOX_WS_X11 74 // WORKAROUND: 75 // We could be asked to minimize already, but just 76 // not yet executed that order to current moment. 77 if (m_fIsMinimizationRequested) 78 return; 79 #endif 80 72 81 /* Make sure window is visible: */ 73 82 if (!isVisible() || isMinimized()) … … 81 90 } 82 91 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 92 93 void UIMachineWindowSeamless::sltShowMinimized() 94 { 95 #ifdef VBOX_WS_X11 96 /* Remember that we are asked to minimize: */ 97 m_fIsMinimizationRequested = true; 98 #endif 99 100 showMinimized(); 101 } 83 102 84 103 void UIMachineWindowSeamless::prepareVisualState() … … 125 144 m_pMiniToolBar->addMenus(actionPool()->menus()); 126 145 connect(m_pMiniToolBar, SIGNAL(sigMinimizeAction()), 127 this, SLOT(s howMinimized()), Qt::QueuedConnection);146 this, SLOT(sltShowMinimized()), Qt::QueuedConnection); 128 147 connect(m_pMiniToolBar, SIGNAL(sigExitAction()), 129 148 actionPool()->action(UIActionIndexRT_M_View_T_Seamless), SLOT(trigger())); … … 323 342 LogRel2(("GUI: UIMachineWindowSeamless::changeEvent: Window restored\n")); 324 343 m_fIsMinimized = false; 344 /* Remember that we no more asked to minimize: */ 345 m_fIsMinimizationRequested = false; 325 346 showInNecessaryMode(); 326 347 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r65520 r65800 47 47 void sltRevokeWindowActivation(); 48 48 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 49 50 /** Shows window in minimized state. */ 51 void sltShowMinimized(); 49 52 50 53 private: … … 105 108 bool m_fWasMinimized; 106 109 #ifdef VBOX_WS_X11 110 /** X11: Holds whether the window minimization is currently requested. 111 * Used to prevent accidentally restoring to seamless state. */ 112 bool m_fIsMinimizationRequested; 107 113 /** X11: Holds whether the window is currently minimized. 108 114 * Used to restore maximized state when the window restored again. */
Note:
See TracChangeset
for help on using the changeset viewer.