Changeset 39066 in vbox
- Timestamp:
- Oct 20, 2011 10:09:47 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r39065 r39066 841 841 UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent); 842 842 843 /** If only the pitch has changed (or nothing at all!) we only update the 844 * framebuffer and don't touch the window. This prevents unwanted resizes 845 * when entering or exiting fullscreen on X.Org guests and when 846 * re-attaching the framebuffer on a view switch. */ 847 bool fResize = pResizeEvent->width() != frameBuffer()->width() 848 || pResizeEvent->height() != frameBuffer()->height(); 849 843 850 /* Perform framebuffer resize: */ 844 851 frameBuffer()->resizeEvent(pResizeEvent); 845 852 846 /* Reapply maximum size restriction for machine-view: */ 847 setMaximumSize(sizeHint()); 848 849 /* Perform machine-view resize: */ 850 resize(pResizeEvent->width(), pResizeEvent->height()); 851 852 /* May be we have to restrict minimum size? */ 853 maybeRestrictMinimumSize(); 854 855 /* Let our toplevel widget calculate its sizeHint properly: */ 856 QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest); 853 if (fResize) 854 { 855 /* Reapply maximum size restriction for machine-view: */ 856 setMaximumSize(sizeHint()); 857 858 /* Perform machine-view resize: */ 859 resize(pResizeEvent->width(), pResizeEvent->height()); 860 861 /* May be we have to restrict minimum size? */ 862 maybeRestrictMinimumSize(); 863 864 /* Let our toplevel widget calculate its sizeHint properly: */ 865 QCoreApplication::sendPostedEvents(0, QEvent::LayoutRequest); 857 866 858 867 #ifdef Q_WS_MAC 859 machineLogic()->updateDockIconSize(screenId(), pResizeEvent->width(), pResizeEvent->height());868 machineLogic()->updateDockIconSize(screenId(), pResizeEvent->width(), pResizeEvent->height()); 860 869 #endif /* Q_WS_MAC */ 861 870 862 /* Update machine-view sliders: */ 863 updateSliders(); 864 865 /* Normalize machine-window geometry: */ 866 if (!fFullscreenOrSeamless) 867 normalizeGeometry(true /* Adjust Position? */); 871 /* Update machine-view sliders: */ 872 updateSliders(); 873 874 /* Normalize machine-window geometry: */ 875 if (!fFullscreenOrSeamless) 876 normalizeGeometry(true /* Adjust Position? */); 877 } 868 878 869 879 /* Report to the VM thread that we finished resizing: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r39023 r39066 222 222 QString strHintSent = machine.GetExtraData(strKey); 223 223 if (!strHintSent.isEmpty()) 224 sltPerformGuestResize(guestSizeHint()); 224 { 225 QSize hint = guestSizeHint(); 226 resize(hint); 227 sltPerformGuestResize(hint); 228 } 225 229 } 226 230 }
Note:
See TracChangeset
for help on using the changeset viewer.