- Timestamp:
- Jul 1, 2016 3:26:45 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r61982 r61985 50 50 , m_pMiniToolBar(0) 51 51 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 52 , m_fWasMinimized(false) 52 53 { 53 54 } … … 186 187 AssertPtrReturnVoid(pSeamlessLogic); 187 188 188 /* Make sure window should be shown andmapped to some host-screen: */189 /* If window shouldn't be shown or mapped to some host-screen: */ 189 190 if (!uisession()->isScreenVisible(m_uScreenId) || 190 191 !pSeamlessLogic->hasHostScreenForGuestScreen(m_uScreenId)) 191 192 { 192 /* Hide window: */ 193 /* Remember whether the window was minimized: */ 194 if (isMinimized()) 195 m_fWasMinimized = true; 196 197 /* Hide window and reset it's state to NONE: */ 198 setWindowState(Qt::WindowNoState); 193 199 hide(); 194 200 } 201 /* If window should be shown and mapped to some host-screen: */ 195 202 else 196 203 { 197 /* Ignore if window minimized: */ 198 if (isMinimized()) 199 return; 204 /* Check whether window was minimized: */ 205 const bool fWasMinimized = isMinimized() && isVisible(); 206 /* And reset it's state in such case before exposing: */ 207 if (fWasMinimized) 208 setWindowState(Qt::WindowNoState); 200 209 201 210 /* Make sure window have appropriate geometry: */ … … 204 213 /* Show window in normal mode: */ 205 214 show(); 215 216 /* Restore minimized state if necessary: */ 217 if (m_fWasMinimized || fWasMinimized) 218 { 219 m_fWasMinimized = false; 220 QMetaObject::invokeMethod(this, "showMinimized", Qt::QueuedConnection); 221 } 206 222 207 223 /* Adjust machine-view size if necessary: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r60362 r61985 98 98 #endif /* VBOX_WITH_MASKED_SEAMLESS */ 99 99 100 /** Holds whether the window was minimized before became hidden. 101 * Used to restore minimized state when the window shown again. */ 102 bool m_fWasMinimized; 103 100 104 /** Factory support. */ 101 105 friend class UIMachineWindow;
Note:
See TracChangeset
for help on using the changeset viewer.