Changeset 61974 in vbox
- Timestamp:
- Jul 1, 2016 11:49:43 AM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen
- Files:
-
- 2 edited
-
UIMachineWindowFullscreen.cpp (modified) (2 diffs)
-
UIMachineWindowFullscreen.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r61969 r61974 61 61 #endif /* VBOX_WS_MAC */ 62 62 , m_fWasMinimized(false) 63 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000 64 , m_fIsMinimized(false) 65 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */ 63 66 { 64 67 } … … 537 540 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 538 541 542 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000 543 void UIMachineWindowFullscreen::changeEvent(QEvent *pEvent) 544 { 545 switch (pEvent->type()) 546 { 547 case QEvent::WindowStateChange: 548 { 549 /* Watch for window state changes: */ 550 QWindowStateChangeEvent *pChangeEvent = static_cast<QWindowStateChangeEvent*>(pEvent); 551 LogRel2(("GUI: UIMachineWindowFullscreen::changeEvent: Window state changed from %d to %d\n", 552 (int)pChangeEvent->oldState(), (int)windowState())); 553 if ( windowState() == Qt::WindowMinimized 554 && pChangeEvent->oldState() == Qt::WindowNoState 555 && !m_fIsMinimized) 556 { 557 /* Mark window minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ 558 LogRel2(("GUI: UIMachineWindowFullscreen::changeEvent: Window minimized\n")); 559 m_fIsMinimized = true; 560 } 561 else 562 if ( windowState() == Qt::WindowNoState 563 && pChangeEvent->oldState() == Qt::WindowMinimized 564 && m_fIsMinimized) 565 { 566 /* Mark window restored, and do manual restoring with showInNecessaryMode(): */ 567 LogRel2(("GUI: UIMachineWindowFullscreen::changeEvent: Window restored\n")); 568 m_fIsMinimized = false; 569 showInNecessaryMode(); 570 } 571 break; 572 } 573 default: 574 break; 575 } 576 577 /* Call to base-class: */ 578 UIMachineWindow::changeEvent(pEvent); 579 } 580 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */ 581 539 582 #ifdef VBOX_WS_WIN 540 583 # if QT_VERSION >= 0x050000 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r61963 r61974 102 102 #endif /* VBOX_WS_WIN || VBOX_WS_X11 */ 103 103 104 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000 105 /** Handles @a pEvent about state change. */ 106 void changeEvent(QEvent *pEvent); 107 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */ 108 104 109 #ifdef VBOX_WS_WIN 105 110 # if QT_VERSION >= 0x050000 … … 124 129 * Used to restore minimized state when the window shown again. */ 125 130 bool m_fWasMinimized; 131 #if defined(VBOX_WS_X11) && QT_VERSION >= 0x050000 132 /** Holds whether the window is currently minimized. 133 * Used to restore full-screen state when the window restored again. */ 134 bool m_fIsMinimized; 135 #endif /* VBOX_WS_X11 && QT_VERSION >= 0x050000 */ 126 136 127 137 /** Factory support. */
Note:
See TracChangeset
for help on using the changeset viewer.

