Changeset 27534 in vbox
- Timestamp:
- Mar 19, 2010 1:31:05 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
-
VBoxConsoleWnd.h (modified) (3 diffs)
-
VBoxSelectorWnd.cpp (modified) (1 diff)
-
darwin/VBoxUtils-darwin-cocoa.mm (modified) (1 diff)
-
darwin/VBoxUtils-darwin.cpp (modified) (1 diff)
-
darwin/VBoxUtils-darwin.h (modified) (2 diffs)
-
runtime/normal/UIMachineWindowNormal.cpp (modified) (6 diffs)
-
runtime/normal/UIMachineWindowNormal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h
r27374 r27534 42 42 #endif 43 43 #ifdef Q_WS_MAC 44 # include "VBoxUtils.h" 44 45 # include <ApplicationServices/ApplicationServices.h> 45 46 # ifndef QT_MAC_USE_COCOA … … 74 75 virtual ~VBoxConsoleWnd(); 75 76 76 bool isWindowMaximized() const77 bool isWindowMaximized() 77 78 { 78 79 #ifdef Q_WS_MAC … … 80 81 * maximize the window. This situation has to be considered when 81 82 * checking for maximized or fullscreen mode. */ 82 return !isTrueSeamless() && QMainWindow::isMaximized();83 return !isTrueSeamless() && ::darwinIsWindowMaximized(this); 83 84 #else /* Q_WS_MAC */ 84 85 return QMainWindow::isMaximized(); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r27259 r27534 734 734 .arg (mNormalGeo.x()).arg (y) 735 735 .arg (mNormalGeo.width()).arg (mNormalGeo.height()); 736 #ifdef Q_WS_MAC 737 if (::darwinIsWindowMaximized(this)) 738 #else /* Q_WS_MAC */ 736 739 if (isMaximized()) 740 #endif /* !Q_WS_MAC */ 737 741 winPos += QString (",%1").arg (VBoxDefs::GUI_LastWindowPosition_Max); 738 742 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin-cocoa.mm
r26716 r27534 185 185 } 186 186 187 bool darwinIsWindowMaximized(NativeWindowRef aWindow) 188 { 189 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 190 191 bool fResult = [aWindow isZoomed]; 192 193 [pool release]; 194 return fResult; 195 } 196 187 197 float darwinSmallFontSize() 188 198 { 189 return [NSFont systemFontSizeForControlSize: NSSmallControlSize]; 190 } 191 199 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 200 201 float size = [NSFont systemFontSizeForControlSize: NSSmallControlSize]; 202 203 [pool release]; 204 return size; 205 } 206 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.cpp
r26699 r27534 105 105 { 106 106 ::darwinSetShowsResizeIndicatorImpl (::darwinToNativeWindow (aWidget), aEnabled); 107 } 108 109 bool darwinIsWindowMaximized(QWidget *aWidget) 110 { 111 #ifdef QT_MAC_USE_COCOA 112 /* Currently only necessary in the Cocoa version */ 113 return ::darwinIsWindowMaximized(::darwinToNativeWindow(aWidget)); 114 #else /* QT_MAC_USE_COCOA */ 115 NOREF (aWidget); 116 return false; 117 #endif /* !QT_MAC_USE_COCOA */ 107 118 } 108 119 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxUtils-darwin.h
r26699 r27534 93 93 void darwinWindowInvalidateShadowImpl (NativeWindowRef aWindow); 94 94 int darwinWindowToolBarHeight (NativeWindowRef aWindow); 95 bool darwinIsWindowMaximized(NativeWindowRef aWindow); 96 95 97 float darwinSmallFontSize(); 96 98 bool darwinSetFrontMostProcess(); … … 172 174 void darwinWindowInvalidateShadow (QWidget *aWidget); 173 175 int darwinWindowToolBarHeight (QWidget *aWidget); 176 bool darwinIsWindowMaximized(QWidget *aWidget); 174 177 QString darwinSystemLanguage (void); 175 178 QPixmap darwinCreateDragPixmap (const QPixmap& aPixmap, const QString &aText); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r27436 r27534 30 30 /* Local includes */ 31 31 #include "VBoxGlobal.h" 32 #include "VBoxUtils.h" 32 33 33 34 #include "UIActionsPool.h" … … 260 261 { 261 262 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent); 262 if (!isMaximized ())263 if (!isMaximizedChecked()) 263 264 { 264 265 m_normalGeometry.setSize(pResizeEvent->size()); … … 272 273 case QEvent::Move: 273 274 { 274 if (!isMaximized ())275 if (!isMaximizedChecked()) 275 276 { 276 277 m_normalGeometry.moveTo(geometry().x(), geometry().y()); … … 559 560 CMachine machine = session().GetMachine(); 560 561 562 printf("bla\n"); 561 563 /* Save extra-data settings: */ 562 564 { … … 564 566 .arg(m_normalGeometry.x()).arg(m_normalGeometry.y()) 565 567 .arg(m_normalGeometry.width()).arg(m_normalGeometry.height()); 566 if (isMaximized ())568 if (isMaximizedChecked()) 567 569 strWindowPosition += QString(",%1").arg(VBoxDefs::GUI_LastWindowPosition_Max); 568 570 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg(VBoxDefs::GUI_LastWindowPosition) : … … 595 597 } 596 598 599 bool UIMachineWindowNormal::isMaximizedChecked() 600 { 601 #ifdef Q_WS_MAC 602 /* On the Mac the WindowStateChange signal doesn't seems to be delivered 603 * when the user get out of the maximized state. So check this ourself. */ 604 return ::darwinIsWindowMaximized(this); 605 #endif /* !Q_WS_MAC */ 606 return isMaximized(); 607 } 608 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r27375 r27534 106 106 /* Other members: */ 107 107 void showSimple(); 108 bool isMaximizedChecked(); 108 109 109 110 /* Indicators pool: */
Note:
See TracChangeset
for help on using the changeset viewer.

