Changeset 65554 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 31, 2017 4:52:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r65552 r65554 973 973 } 974 974 975 #ifdef VBOX_WS_X11976 /* If that's window event: */977 if (pWatched == this)978 {979 switch (pEvent->type())980 {981 case QEvent::WindowStateChange:982 {983 /* Watch for window state changes: */984 QWindowStateChangeEvent *pChangeEvent = static_cast<QWindowStateChangeEvent*>(pEvent);985 LogRel2(("GUI: UIMiniToolBar::eventFilter: Window state changed from %d to %d\n",986 (int)pChangeEvent->oldState(), (int)windowState()));987 if ( windowState() != Qt::WindowMinimized988 && pChangeEvent->oldState() == Qt::WindowMinimized)989 {990 /* Asynchronously call for sltShow(): */991 LogRel2(("GUI: UIMiniToolBar::eventFilter: Window restored\n"));992 QMetaObject::invokeMethod(this, "sltShow", Qt::QueuedConnection);993 }994 break;995 }996 default:997 break;998 }999 }1000 #endif /* VBOX_WS_X11 */1001 1002 975 /* If that's parent window event: */ 1003 976 if (pWatched == m_pParent) … … 1053 1026 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window state changed from %d to %d\n", 1054 1027 (int)pChangeEvent->oldState(), (int)m_pParent->windowState())); 1055 if (m_pParent->windowState() & Qt::WindowMinimized) 1028 1029 if ( m_pParent->windowState() & Qt::WindowMinimized 1030 && !m_fIsParentMinimized) 1056 1031 { 1057 1032 /* Mark parent window minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ 1058 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window minimized\n"));1033 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window is minimized\n")); 1059 1034 m_fIsParentMinimized = true; 1060 1035 } 1061 1036 else 1062 if (m_ pParent->windowState() == Qt::WindowFullScreen)1037 if (m_fIsParentMinimized) 1063 1038 { 1064 /* Mark parent window non-minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ 1065 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window is full-screen\n")); 1066 m_fIsParentMinimized = false; 1039 switch (m_geometryType) 1040 { 1041 case GeometryType_Available: 1042 { 1043 if ( windowState() == Qt::WindowMaximized 1044 && pChangeEvent->oldState() == Qt::WindowNoState) 1045 { 1046 /* Mark parent window non-minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ 1047 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window is maximized\n")); 1048 m_fIsParentMinimized = false; 1049 } 1050 break; 1051 } 1052 case GeometryType_Full: 1053 { 1054 if ( windowState() == Qt::WindowFullScreen 1055 && pChangeEvent->oldState() == Qt::WindowNoState) 1056 { 1057 /* Mark parent window non-minimized, isMinimized() is not enough due to Qt5vsX11 fight: */ 1058 LogRel2(("GUI: UIMiniToolBar::eventFilter: Parent window is full-screen\n")); 1059 m_fIsParentMinimized = false; 1060 } 1061 break; 1062 } 1063 } 1067 1064 } 1068 1065 break;
Note:
See TracChangeset
for help on using the changeset viewer.