Changeset 42318 in vbox
- Timestamp:
- Jul 23, 2012 9:27:05 AM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r42248 r42318 181 181 QString strKey = makeExtraDataKeyPerMonitor(GUI_LastGuestSizeHintWasFullscreen); 182 182 machine.SetExtraData(strKey, isFullscreenOrSeamless() ? "true" : ""); 183 } 184 185 void UIMachineView::sltDesktopResized() 186 { 187 setMaxGuestSize(); 183 188 } 184 189 … … 494 499 } 495 500 501 void UIMachineView::prepareConnections() 502 { 503 /* Desktop resolution change (e.g. monitor hotplug): */ 504 connect(QApplication::desktop(), SIGNAL(resized(int)), this, 505 SLOT(sltDesktopResized())); 506 } 507 496 508 void UIMachineView::prepareConsoleConnections() 497 509 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r41689 r42318 92 92 void sltPerformGuestResize(const QSize &aSize = QSize()); 93 93 94 /* Watch dog for desktop resizes: */ 95 void sltDesktopResized(); 96 94 97 /* Console callback handlers: */ 95 98 virtual void sltMachineStateChanged(); … … 112 115 virtual void prepareCommon(); 113 116 virtual void prepareFilters(); 117 virtual void prepareConnections(); 114 118 virtual void prepareConsoleConnections(); 115 119 virtual void loadMachineViewSettings(); … … 139 143 const QPixmap& pauseShot() const { return m_pauseShot; } 140 144 /** Atomically store the maximum guest resolution which we currently wish 141 * to handle for @a maxGuestSize() to read. */ 145 * to handle for @a maxGuestSize() to read. Should be called if anything 146 * happens (e.g. a screen hotplug) which might cause the value to change. 147 * @sa m_u64MaxGuestSize. */ 142 148 void setMaxGuestSize(); 143 149 /** Atomically read the maximum guest resolution which we currently wish to 144 150 * handle. This may safely be called from another thread (called by 145 * UIFramebuffer on EMT). */ 151 * UIFramebuffer on EMT). 152 * @sa m_u64MaxGuestSize. */ 146 153 QSize maxGuestSize(); 147 154 /** Retrieve the last non-fullscreen guest size hint (from extra data). … … 225 232 QSize m_fixedMaxGuestSize; 226 233 /** Maximum guest resolution which we wish to handle. Must be accessed 227 * atomically. */ 234 * atomically. 235 * @note The background for this variable is that we need this value to be 236 * available to the EMT thread, but it can only be calculated by the 237 * GUI, and GUI code can only safely be called on the GUI thread due to 238 * (at least) X11 threading issues. So we calculate the value in advance, 239 * monitor things in case it changes and update it atomically when it does. 240 */ 228 241 /** @todo This should be private. */ 229 242 volatile uint64_t m_u64MaxGuestSize; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r41689 r42318 68 68 prepareFilters(); 69 69 70 /* Prepare connections: */ 71 prepareConnections(); 72 70 73 /* Prepare console connections: */ 71 74 prepareConsoleConnections(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r41689 r42318 63 63 /* Prepare event-filters: */ 64 64 prepareFilters(); 65 66 /* Prepare connections: */ 67 prepareConnections(); 65 68 66 69 /* Prepare console connections: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r41689 r42318 68 68 prepareFilters(); 69 69 70 /* Prepare connections: */ 71 prepareConnections(); 72 70 73 /* Prepare console connections: */ 71 74 prepareConsoleConnections(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r41689 r42318 72 72 prepareFilters(); 73 73 74 /* Prepare connections: */ 75 prepareConnections(); 76 74 77 /* Prepare console connections: */ 75 78 prepareConsoleConnections();
Note:
See TracChangeset
for help on using the changeset viewer.