Changeset 66952 in vbox for trunk/src/VBox
- Timestamp:
- May 18, 2017 3:05:51 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 115493
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp
r66951 r66952 688 688 689 689 /* Get corresponding host-screen: */ 690 const int iHostScreen = gpDesktop->screenNumber(m_pParent); 691 Q_UNUSED(iHostScreen); 692 /* And corresponding working area: */ 690 const int iHostScreenCount = gpDesktop->screenCount(); 691 int iHostScreen = gpDesktop->screenNumber(m_pParent); 692 // WORKAROUND: 693 // When switching host-screen count, especially in complex cases where RDP client is "replacing" host-screen(s) with own virtual-screen(s), 694 // Qt could behave quite arbitrary and laggy, and due to racing there could be a situation when QDesktopWidget::screenNumber() returns -1 695 // as a host-screen number where the parent window is currently located. We should handle this situation anyway, so let's assume the parent 696 // window is located on primary (0) host-screen if it's present or ignore this request at all. 697 if (iHostScreen < 0 || iHostScreen >= iHostScreenCount) 698 { 699 if (iHostScreenCount > 0) 700 { 701 LogRel(("GUI: Mini-toolbar parent window #%d is located on invalid host-screen #%d. Fallback to primary.\n", m_iWindowIndex, iHostScreen)); 702 iHostScreen = 0; 703 } 704 else 705 { 706 LogRel(("GUI: Mini-toolbar parent window #%d is located on invalid host-screen #%d. Ignore request.\n", m_iWindowIndex, iHostScreen)); 707 return; 708 } 709 } 710 711 /* Get corresponding working area: */ 693 712 QRect workingArea; 694 713 switch (m_geometryType)
Note:
See TracChangeset
for help on using the changeset viewer.