- Timestamp:
- Feb 26, 2013 12:22:04 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83964
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r44528 r44827 436 436 #endif /* Q_WS_MAC */ 437 437 438 void UIMachineLogic::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect) 439 { 440 /* Ignore KGuestMonitorChangedEventType_NewOrigin change event: */ 441 if (changeType == KGuestMonitorChangedEventType_NewOrigin) 442 return; 443 /* Ignore KGuestMonitorChangedEventType_Disabled event if there is only one window visible: */ 444 AssertMsg(uisession()->countOfVisibleWindows() > 0, ("All machine windows are hidden!")); 445 if ( changeType == KGuestMonitorChangedEventType_Disabled 446 && uisession()->countOfVisibleWindows() == 1 447 && uisession()->isScreenVisible(uScreenId)) 448 return; 449 450 /* Process KGuestMonitorChangedEventType_Enabled change event: */ 451 if ( !uisession()->isScreenVisible(uScreenId) 452 && changeType == KGuestMonitorChangedEventType_Enabled) 453 uisession()->setScreenVisible(uScreenId, true); 454 /* Process KGuestMonitorChangedEventType_Disabled change event: */ 455 else if ( uisession()->isScreenVisible(uScreenId) 456 && changeType == KGuestMonitorChangedEventType_Disabled) 457 uisession()->setScreenVisible(uScreenId, false); 458 459 /* Deliver event to corresponding machine-window: */ 460 if (uScreenId < (ulong)machineWindows().size()) 461 machineWindows()[uScreenId]->handleGuestMonitorChange(); 462 } 463 438 464 UIMachineLogic::UIMachineLogic(QObject *pParent, UISession *pSession, UIVisualStateType visualStateType) 439 465 : QIWithRetranslateUI3<QObject>(pParent) … … 563 589 connect(uisession(), SIGNAL(sigShowWindows()), this, SLOT(sltShowWindows())); 564 590 #endif /* Q_WS_MAC */ 591 592 /* Guest monitor-change updater: */ 593 connect(uisession(), SIGNAL(sigGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)), 594 this, SLOT(sltGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect))); 565 595 } 566 596 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r43622 r44827 6 6 7 7 /* 8 * Copyright (C) 2010-201 2Oracle Corporation8 * Copyright (C) 2010-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 # include <VBox/dbggui.h> 27 27 #endif /* VBOX_WITH_DEBUGGER_GUI */ 28 29 /* COM includes: */ 30 #include "COMEnums.h" 28 31 29 32 /* Forward declarations: */ … … 94 97 virtual void sltShowWindows(); 95 98 #endif /* RT_OS_DARWIN */ 99 virtual void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 96 100 97 101 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r43918 r44827 7 7 8 8 /* 9 * Copyright (C) 2010-201 2Oracle Corporation9 * Copyright (C) 2010-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 159 159 /* Update window-title: */ 160 160 updateAppearanceOf(UIVisualElement_WindowTitle); 161 }162 163 void UIMachineWindow::sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect /* screenGeo */)164 {165 /* Ignore change events for other screens: */166 if (uScreenId != m_uScreenId)167 return;168 /* Ignore KGuestMonitorChangedEventType_NewOrigin change event: */169 if (changeType == KGuestMonitorChangedEventType_NewOrigin)170 return;171 /* Ignore KGuestMonitorChangedEventType_Disabled event if there is only one window visible: */172 AssertMsg(uisession()->countOfVisibleWindows() > 0, ("All machine windows are hidden!"));173 if ((changeType == KGuestMonitorChangedEventType_Disabled) &&174 (uisession()->countOfVisibleWindows() == 1))175 return;176 177 /* Process KGuestMonitorChangedEventType_Enabled change event: */178 if (isHidden() && changeType == KGuestMonitorChangedEventType_Enabled)179 uisession()->setScreenVisible(m_uScreenId, true);180 /* Process KGuestMonitorChangedEventType_Disabled change event: */181 else if (!isHidden() && changeType == KGuestMonitorChangedEventType_Disabled)182 uisession()->setScreenVisible(m_uScreenId, false);183 184 /* Update screen visibility status: */185 showInNecessaryMode();186 161 } 187 162 … … 557 532 /* Machine state-change updater: */ 558 533 connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged())); 559 560 /* Guest monitor-change updater: */561 connect(uisession(), SIGNAL(sigGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)),562 this, SLOT(sltGuestMonitorChange(KGuestMonitorChangedEventType, ulong, QRect)));563 534 } 564 535 … … 632 603 UIMachineView::destroy(m_pMachineView); 633 604 m_pMachineView = 0; 605 } 606 607 void UIMachineWindow::handleGuestMonitorChange() 608 { 609 showInNecessaryMode(); 634 610 } 635 611 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r41587 r44827 6 6 7 7 /* 8 * Copyright (C) 2010-201 2Oracle Corporation8 * Copyright (C) 2010-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 66 66 /* Session event-handlers: */ 67 67 virtual void sltMachineStateChanged(); 68 virtual void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);69 68 70 69 protected: … … 105 104 virtual void cleanupSessionConnections() {} 106 105 106 /* Visibility stuff: */ 107 void handleGuestMonitorChange(); 108 107 109 /* Update stuff: */ 108 110 virtual void updateAppearanceOf(int iElement);
Note:
See TracChangeset
for help on using the changeset viewer.