Changeset 11135 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 5, 2008 2:47:00 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
r10439 r11135 297 297 QMap <QAction *, CHostFloppyDrive> hostFloppyMap; 298 298 299 QPoint normal_pos; 300 QSize normal_size; 299 QRect mNormalGeometry; 301 300 QSize prev_min_size; 302 301 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r11130 r11135 708 708 #endif 709 709 710 /* restore the position of the window and some options */710 /* Restore the position of the window and some options */ 711 711 { 712 712 QString str = cmachine.GetExtraData (VBoxDefs::GUI_LastWindowPosition); … … 726 726 { 727 727 QRect ar = QApplication::desktop()->availableGeometry (QPoint (x, y)); 728 728 729 /* Do some position checks */ 729 730 if (x < ar.left() || x > ar.right()) … … 732 733 y = ar.top(); 733 734 734 normal_pos = QPoint (x, y); 735 normal_size = QSize (w, h); 736 737 move (normal_pos); 738 resize (normal_size); 735 mNormalGeometry = QRect (x, y, w, h); 736 737 setGeometry (x, y, w, h); 739 738 } 740 739 else 741 { 742 normal_pos = QPoint(); 743 normal_size = QSize(); 744 } 745 /* normalize to the optimal size */ 740 mNormalGeometry = QRect(); 741 742 /* Normalize to the optimal size */ 746 743 console->normalizeGeometry (true /* adjustPosition */); 747 /* maximize if needed */ 744 745 /* Maximize if needed */ 748 746 if (max) 749 747 setWindowState (windowState() | Qt::WindowMaximized); … … 1011 1009 CMachine machine = csession.GetMachine(); 1012 1010 QString winPos = QString ("%1,%2,%3,%4") 1013 .arg (normal_pos.x()).arg (normal_pos.y()) 1014 .arg (normal_size.width()) 1015 .arg (normal_size.height()); 1011 .arg (mNormalGeometry.x()).arg (mNormalGeometry.y()) 1012 .arg (mNormalGeometry.width()).arg (mNormalGeometry.height()); 1016 1013 if (isMaximized() || (mIsFullscreen && was_max) 1017 1014 || (mIsSeamless && was_max)) … … 1135 1132 !isTrueFullscreen() && !isTrueSeamless()) 1136 1133 { 1137 normal_size = re->size();1134 mNormalGeometry.setSize (re->size()); 1138 1135 #ifdef VBOX_WITH_DEBUGGER_GUI 1139 1136 dbgAdjustRelativePos(); … … 1155 1152 if (!isMaximized() && !isTrueFullscreen() && !isTrueSeamless()) 1156 1153 { 1157 normal_pos = pos();1154 mNormalGeometry.moveTo (geometry().x(), geometry().y()); 1158 1155 #ifdef VBOX_WITH_DEBUGGER_GUI 1159 1156 dbgAdjustRelativePos();
Note:
See TracChangeset
for help on using the changeset viewer.