equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
48 qcocoapanel_mac.mm. |
48 qcocoapanel_mac.mm. |
49 The reason we need to do copy and paste in the first place, rather than |
49 The reason we need to do copy and paste in the first place, rather than |
50 resolve to method overriding, is that QCocoaPanel needs to inherit from |
50 resolve to method overriding, is that QCocoaPanel needs to inherit from |
51 NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). |
51 NSPanel, while QCocoaWindow needs to inherit NSWindow rather than NSPanel). |
52 ****************************************************************************/ |
52 ****************************************************************************/ |
|
53 |
|
54 // WARNING: Don't include any header files from within this file. Put them |
|
55 // directly into qcocoawindow_mac_p.h and qcocoapanel_mac_p.h |
53 |
56 |
54 QT_BEGIN_NAMESPACE |
57 QT_BEGIN_NAMESPACE |
55 extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm |
58 extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.mm |
56 extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp |
59 extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp |
57 QT_END_NAMESPACE |
60 QT_END_NAMESPACE |
183 if (styleMask & QtMacCustomizeWindow) |
186 if (styleMask & QtMacCustomizeWindow) |
184 return [QT_MANGLE_NAMESPACE(QCocoaWindowCustomThemeFrame) class]; |
187 return [QT_MANGLE_NAMESPACE(QCocoaWindowCustomThemeFrame) class]; |
185 return [super frameViewClassForStyleMask:styleMask]; |
188 return [super frameViewClassForStyleMask:styleMask]; |
186 } |
189 } |
187 |
190 |
|
191 - (void)displayIfNeeded |
|
192 { |
|
193 |
|
194 QWidget *qwidget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; |
|
195 if (qwidget == 0) { |
|
196 [super displayIfNeeded]; |
|
197 return; |
|
198 } |
|
199 |
|
200 if (QApplicationPrivate::graphicsSystem() != 0) { |
|
201 if (QWidgetBackingStore *bs = qt_widget_private(qwidget)->maybeBackingStore()) |
|
202 bs->sync(qwidget, qwidget->rect()); |
|
203 } |
|
204 [super displayIfNeeded]; |
|
205 } |
|
206 |
|
207 |