summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_mac.mm
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-07 01:46:24 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-07 01:46:24 (GMT)
commite56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924 (patch)
treef130e76140457cf8071193278acd783d898c54fb /src/gui/kernel/qwidget_mac.mm
parentb20ef0ade0aec89b969bd0ae7f754c680e390c67 (diff)
parent66733e95351f0088fd206a9215bde9d14510bc1e (diff)
downloadQt-e56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924.zip
Qt-e56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924.tar.gz
Qt-e56ae7fb7b269afe36a3bd2f4de0c10f8c2a6924.tar.bz2
Merge branch 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration into 4.7-integration
* 'qt-4.7-from-4.6' of scm.dev.nokia.troll.no:qt/qt-integration: (123 commits) Added missing tests to tests/auto/*.pro Compile with DirectFB version >= 1.2.0 && < 1.2.9 QDirectFBPaintEngine optimization Add some warnings when using DISABLE/WARN in DFB Fix build with Mesa 7.8's EGL implementatioon Reset the byte order in the iconv codec after using it. fix "using namespace" recursion crash Fix for QTBUG-6659 Parent window accepts pointer events wrongly If no IAP defined force IAP dialog Fixed key mappings on X11 QDom: prevent infinite loop when cloning a DTD Compile fix for Windows Mobile and OpenGLES2 QPrintPreviewDialog number of pages is partially blocked from view in OSX QS60Style ignores widget palette when drawing highlighted widget text Fix for QTBUG-8762 QApplication::setGraphicsSystem("raster") crashes. Fixed crash at application exit when QProcess was used in Symbian QMessageBox is not stretched to screen width if the content is narrow Wrong dirty region after row selection in right-to-left mode in QTableView Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( f3110d2f94c825477afac054ed448e45d47f5670 ) Tab to space fixes to qdilaog.cpp ...
Diffstat (limited to 'src/gui/kernel/qwidget_mac.mm')
-rw-r--r--src/gui/kernel/qwidget_mac.mm18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 6d8c97b..5889589 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -152,6 +152,7 @@ static bool qt_mac_raise_process = true;
static OSWindowRef qt_root_win = 0;
QWidget *mac_mouse_grabber = 0;
QWidget *mac_keyboard_grabber = 0;
+extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
#ifndef QT_MAC_USE_COCOA
#ifdef QT_NAMESPACE
@@ -872,7 +873,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
& ~Qt::WindowMaximized));
QApplication::sendSpontaneousEvent(widget, &e);
}
- extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
qt_button_down = 0;
} else if(ekind == kEventWindowCollapsed) {
if (!widget->isMinimized()) {
@@ -900,7 +900,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
//we send a hide to be like X11/Windows
QEvent e(QEvent::Hide);
QApplication::sendSpontaneousEvent(widget, &e);
- extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
qt_button_down = 0;
} else if(ekind == kEventWindowToolbarSwitchMode) {
macSendToolbarChangeEvent(widget);
@@ -1274,6 +1273,11 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
if (widget->isVisible() && widget->updatesEnabled()) { //process the actual paint event.
if(widget->testAttribute(Qt::WA_WState_InPaintEvent))
qWarning("QWidget::repaint: Recursive repaint detected");
+ if (widget->isWindow() && !widget->d_func()->isOpaque
+ && !widget->testAttribute(Qt::WA_MacBrushedMetal)) {
+ QRect qrgnRect = qrgn.boundingRect();
+ CGContextClearRect(cg, CGRectMake(qrgnRect.x(), qrgnRect.y(), qrgnRect.width(), qrgnRect.height()));
+ }
QPoint redirectionOffset(0, 0);
QWidget *tl = widget->window();
@@ -1324,13 +1328,6 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
widget->d_func()->restoreRedirected();
}
- if (widget->isWindow() && !widget->d_func()->isOpaque
- && !widget->testAttribute(Qt::WA_MacBrushedMetal)) {
- QRect qrgnRect = qrgn.boundingRect();
- CGContextClearRect(cg, CGRectMake(qrgnRect.x(), qrgnRect.y(), qrgnRect.width(), qrgnRect.height()));
- }
-
-
if(!HIObjectIsOfClass((HIObjectRef)hiview, kObjectQWidget))
CallNextEventHandler(er, event);
@@ -1527,7 +1524,6 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
if (widget) {
qt_event_request_window_change(widget);
if (!HIViewIsVisible(HIViewRef(widget->winId()))) {
- extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
if (widget == qt_button_down)
qt_button_down = 0;
}
@@ -1536,7 +1532,6 @@ OSStatus QWidgetPrivate::qt_widget_event(EventHandlerCallRef er, EventRef event,
break; }
case kEventClassMouse: {
bool send_to_app = false;
- extern QPointer<QWidget> qt_button_down; //qapplication_mac.cpp
if(qt_button_down)
send_to_app = true;
if(send_to_app) {
@@ -3493,7 +3488,6 @@ void QWidgetPrivate::hide_sys()
Q_Q(QWidget);
if((q->windowType() == Qt::Desktop)) //you can't hide the desktop!
return;
-
QMacCocoaAutoReleasePool pool;
if(q->isWindow()) {
#ifdef QT_MAC_USE_COCOA