Changeset 90567 in vbox
- Timestamp:
- Aug 7, 2021 11:50:28 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146173
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r90083 r90567 112 112 prepareMachineView(); 113 113 114 /* Prepare notification-center: */ 115 prepareNotificationCenter(); 116 114 117 /* Prepare handlers: */ 115 118 prepareHandlers(); … … 151 154 /* Cleanup visual-state: */ 152 155 cleanupVisualState(); 156 157 /* Cleanup notification-center: */ 158 cleanupNotificationCenter(); 153 159 154 160 /* Cleanup machine-view: */ … … 519 525 } 520 526 527 void UIMachineWindow::prepareNotificationCenter() 528 { 529 // for now it will be added from within particular visual mode windows .. 530 } 531 521 532 void UIMachineWindow::prepareHandlers() 522 533 { … … 535 546 /* Unregister keyboard-handler: */ 536 547 machineLogic()->keyboardHandler()->cleanupListener(m_uScreenId); 548 } 549 550 void UIMachineWindow::cleanupNotificationCenter() 551 { 552 // for now it will be removed from within particular visual mode windows .. 537 553 } 538 554 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h
r86051 r90567 164 164 virtual void prepareStatusBar() {} 165 165 virtual void prepareMachineView(); 166 virtual void prepareNotificationCenter(); 166 167 virtual void prepareVisualState() {} 167 168 virtual void prepareHandlers(); … … 172 173 virtual void cleanupHandlers(); 173 174 virtual void cleanupVisualState() {} 175 virtual void cleanupNotificationCenter(); 174 176 virtual void cleanupMachineView(); 175 177 virtual void cleanupStatusBar() {} -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r90167 r90567 45 45 #include "UIMessageCenter.h" 46 46 #include "UIMousePointerShapeData.h" 47 #include "UINotificationCenter.h" 47 48 #include "UIPopupCenter.h" 48 49 #include "UIWizardFirstRun.h" … … 526 527 cleanupFramebuffers(); 527 528 cleanupConsoleEventHandlers(); 529 cleanupNotificationCenter(); 528 530 cleanupSession(); 529 531 } … … 939 941 if (!prepareSession()) 940 942 return false; 943 prepareNotificationCenter(); 941 944 prepareConsoleEventHandlers(); 942 945 prepareFramebuffers(); … … 1009 1012 /* True by default: */ 1010 1013 return true; 1014 } 1015 1016 void UISession::prepareNotificationCenter() 1017 { 1018 UINotificationCenter::create(); 1011 1019 } 1012 1020 … … 1354 1362 } 1355 1363 1364 void UISession::cleanupNotificationCenter() 1365 { 1366 UINotificationCenter::destroy(); 1367 } 1368 1356 1369 void UISession::cleanupSession() 1357 1370 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r90086 r90567 395 395 bool prepare(); 396 396 bool prepareSession(); 397 void prepareNotificationCenter(); 397 398 void prepareConsoleEventHandlers(); 398 399 void prepareFramebuffers(); … … 414 415 void cleanupFramebuffers(); 415 416 void cleanupConsoleEventHandlers(); 417 void cleanupNotificationCenter(); 416 418 void cleanupSession(); 417 419 void cleanup(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r88649 r90567 32 32 #include "UIMachineWindowFullscreen.h" 33 33 #include "UIMachineView.h" 34 #include "UINotificationCenter.h" 34 35 #if defined(VBOX_WS_WIN) || defined(VBOX_WS_X11) 35 36 # include "UIMachineDefs.h" … … 216 217 217 218 showMinimized(); 219 } 220 221 void UIMachineWindowFullscreen::prepareNotificationCenter() 222 { 223 if (gpNotificationCenter && (m_uScreenId == 0)) 224 gpNotificationCenter->setParent(centralWidget()); 218 225 } 219 226 … … 325 332 /* Call to base-class: */ 326 333 UIMachineWindow::cleanupVisualState(); 334 } 335 336 void UIMachineWindowFullscreen::cleanupNotificationCenter() 337 { 338 if (gpNotificationCenter && (gpNotificationCenter->parent() == centralWidget())) 339 gpNotificationCenter->setParent(0); 327 340 } 328 341 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r88635 r90567 88 88 private: 89 89 90 /** Prepare notification-center routine. */ 91 void prepareNotificationCenter(); 90 92 /** Prepare visual-state routine. */ 91 93 void prepareVisualState(); … … 101 103 /** Cleanup visual-state routine. */ 102 104 void cleanupVisualState(); 105 /** Cleanup notification-center routine. */ 106 void cleanupNotificationCenter(); 103 107 104 108 /** Updates geometry according to visual-state. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r88655 r90567 37 37 #include "UIMachineLogic.h" 38 38 #include "UIMachineView.h" 39 #include "UINotificationCenter.h" 39 40 #include "UIIconPool.h" 40 41 #include "UISession.h" … … 319 320 } 320 321 322 void UIMachineWindowNormal::prepareNotificationCenter() 323 { 324 if (gpNotificationCenter && (m_uScreenId == 0)) 325 gpNotificationCenter->setParent(centralWidget()); 326 } 327 321 328 void UIMachineWindowNormal::prepareVisualState() 322 329 { … … 422 429 UICocoaApplication::instance()->unregisterCallbackForStandardWindowButton(this, StandardWindowButtonType_Zoom); 423 430 #endif /* VBOX_WS_MAC */ 431 } 432 433 void UIMachineWindowNormal::cleanupNotificationCenter() 434 { 435 if (gpNotificationCenter && (gpNotificationCenter->parent() == centralWidget())) 436 gpNotificationCenter->setParent(0); 424 437 } 425 438 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r88651 r90567 98 98 /** Prepare status-bar routine. */ 99 99 void prepareStatusBar(); 100 /** Prepare notification-center routine. */ 101 void prepareNotificationCenter(); 100 102 /** Prepare visual-state routine. */ 101 103 void prepareVisualState(); … … 105 107 /** Cleanup visual-state routine. */ 106 108 void cleanupVisualState(); 109 /** Cleanup notification-center routine. */ 110 void cleanupNotificationCenter(); 107 111 /** Cleanup session connections routine. */ 108 112 void cleanupSessionConnections(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r88651 r90567 33 33 #include "UIMachineWindowScale.h" 34 34 #include "UIMachineView.h" 35 #include "UINotificationCenter.h" 35 36 #ifdef VBOX_WS_MAC 36 37 # include "VBoxUtils.h" … … 56 57 m_pLeftSpacer->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); 57 58 m_pRightSpacer->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed); 59 } 60 61 void UIMachineWindowScale::prepareNotificationCenter() 62 { 63 if (gpNotificationCenter && (m_uScreenId == 0)) 64 gpNotificationCenter->setParent(centralWidget()); 58 65 } 59 66 … … 139 146 } 140 147 #endif /* VBOX_WS_MAC */ 148 149 void UIMachineWindowScale::cleanupNotificationCenter() 150 { 151 if (gpNotificationCenter && (gpNotificationCenter->parent() == centralWidget())) 152 gpNotificationCenter->setParent(0); 153 } 141 154 142 155 void UIMachineWindowScale::showInNecessaryMode() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h
r88651 r90567 40 40 /** Prepare main-layout routine. */ 41 41 void prepareMainLayout(); 42 /** Prepare notification-center routine. */ 43 void prepareNotificationCenter(); 42 44 #ifdef VBOX_WS_MAC 43 45 /** Prepare visual-state routine. */ … … 51 53 void cleanupVisualState(); 52 54 #endif /* VBOX_WS_MAC */ 55 /** Cleanup notification-center routine. */ 56 void cleanupNotificationCenter(); 53 57 54 58 /** Updates visibility according to visual-state. */
Note:
See TracChangeset
for help on using the changeset viewer.