Changeset 846 for trunk/src/gui/kernel/qcocoawindowdelegate_mac.mm
- Timestamp:
- May 5, 2011, 5:36:53 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/gui/kernel/qcocoawindowdelegate_mac.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qcocoawindowdelegate_mac.mm
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 203 203 & ~Qt::WindowMaximized)); 204 204 qt_sendSpontaneousEvent(qwidget, &e); 205 206 207 208 209 205 210 } 206 211 NSRect rect = [[window contentView] frame]; … … 270 275 QWidget *qwidget = m_windowHash->value([notification object]); 271 276 Q_ASSERT(qwidget); 272 if (qwidget->isActiveWindow())273 return; // Widget is already active, no need to go through re-activation.274 275 277 onApplicationWindowChangedActivation(qwidget, true); 276 278 } … … 289 291 QWidget *qwidget = m_windowHash->value([notification object]); 290 292 Q_ASSERT(qwidget); 291 if (qwidget->isActiveWindow())292 return; // Widget is already active, no need to go through re-activation293 294 295 293 onApplicationWindowChangedActivation(qwidget, true); 296 294 } … … 313 311 // saving the current window geometry before the window is maximized 314 312 QWidget *qwidget = m_windowHash->value(window); 315 if (qwidget->isWindow() && !(qwidget->windowState() & Qt::WindowMaximized)) { 316 QWidgetPrivate *widgetPrivate = qt_widget_private(qwidget); 317 widgetPrivate->topData()->normalGeometry = qwidget->geometry(); 313 QWidgetPrivate *widgetPrivate = qt_widget_private(qwidget); 314 if (qwidget->isWindow()) { 315 if(qwidget->windowState() & Qt::WindowMaximized) { 316 // Restoring 317 widgetPrivate->topData()->wasMaximized = false; 318 } else { 319 // Maximizing 320 widgetPrivate->topData()->normalGeometry = qwidget->geometry(); 321 // If the window was maximized we need to update the coordinates since now it will start at 0,0. 322 // We do this in a special field that is only used when not restoring but manually resizing the window. 323 // Since the coordinates are fixed we just set a boolean flag. 324 widgetPrivate->topData()->wasMaximized = true; 325 } 318 326 } 319 327 return YES; … … 387 395 return NO; 388 396 } 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 389 417 @end 390 418 #endif// QT_MAC_USE_COCOA
Note:
See TracChangeset
for help on using the changeset viewer.
