Changeset 92849 in vbox
- Timestamp:
- Dec 9, 2021 2:41:32 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r92848 r92849 587 587 void UIMiniToolBar::sltCheckWindowActivationSanity() 588 588 { 589 /* Do nothing if other window is already active: */ 590 if (QGuiApplication::focusWindow() != windowHandle()) 589 /* Do nothing if parent window is already active: */ 590 if ( m_pParent 591 && QGuiApplication::focusWindow() == m_pParent->windowHandle()) 591 592 return; 592 593 … … 1022 1023 QTimer::singleShot(0, this, SLOT(sltCheckWindowActivationSanity())); 1023 1024 #elif defined(VBOX_WS_X11) 1024 switch (uiCommon().typeOfWindowManager()) 1025 { 1026 case X11WMType_GNOMEShell: 1027 case X11WMType_Mutter: 1028 { 1029 // WORKAROUND: 1030 // Under certain WMs we can receive stolen activation event too early, 1031 // returning activation to initial source immediately makes no sense. 1032 // In fact, Qt is not become aware of actual window activation later, 1033 // so we are going to return window activation in let's say 100ms. 1034 QTimer::singleShot(100, this, SLOT(sltCheckWindowActivationSanity())); 1035 break; 1036 } 1037 default: 1038 { 1039 /* Just call the method asynchronously, after possible popups opened: */ 1040 QTimer::singleShot(0, this, SLOT(sltCheckWindowActivationSanity())); 1041 break; 1042 } 1043 } 1025 // WORKAROUND: 1026 // Under certain WMs we can receive stolen activation event too early, 1027 // returning activation to initial source immediately makes no sense. 1028 // In fact, Qt is not become aware of actual window activation later, 1029 // so we are going to check for window activation in let's say 100ms. 1030 QTimer::singleShot(100, this, SLOT(sltCheckWindowActivationSanity())); 1044 1031 #endif /* VBOX_WS_X11 */ 1045 1032 }
Note:
See TracChangeset
for help on using the changeset viewer.

