diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-12 22:02:57 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-09-12 22:02:57 (GMT) |
commit | 8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0 (patch) | |
tree | e17d0fa8f468a54b9d7f115200875e3e437c09d4 /src/gui/kernel | |
parent | 5f885e684a59944549fff563c3e4dd7c50a668b4 (diff) | |
parent | f129de853154dc1d72cb5651606ca009c3b1f814 (diff) | |
download | Qt-8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0.zip Qt-8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0.tar.gz Qt-8ed55cb6f105b6b147ab82be6b8ce80e86abc0a0.tar.bz2 |
Merge branch '4.6'
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qcocoamenuloader_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_mac.mm | 7 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 50 |
3 files changed, 37 insertions, 22 deletions
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm index ce2a92c..9ab077f 100644 --- a/src/gui/kernel/qcocoamenuloader_mac.mm +++ b/src/gui/kernel/qcocoamenuloader_mac.mm @@ -44,6 +44,7 @@ #include <qaction.h> #include <qcoreapplication.h> #include <private/qcocoamenuloader_mac_p.h> +#include <private/qapplication_p.h> #include <private/qt_mac_p.h> #include <qmenubar.h> @@ -198,6 +199,7 @@ QT_USE_NAMESPACE - (IBAction)qtDispatcherToQAction:(id)sender { + QScopedLoopLevelCounter loopLevelCounter(QApplicationPrivate::instance()->threadData); NSMenuItem *item = static_cast<NSMenuItem *>(sender); if (QAction *action = reinterpret_cast<QAction *>([item tag])) { action->trigger(); diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index faf7f82..6b040bc 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -120,7 +120,7 @@ QT_BEGIN_NAMESPACE extern "C" { extern OSStatus _HIViewScrollRectWithOptions(HIViewRef, const HIRect *, CGFloat, CGFloat, - OptionBits); + OptionBits) __attribute__ ((weak)); } #define kHIViewScrollRectAdjustInvalid 1 #define kHIViewScrollRectDontInvalidateRevealedArea 2 @@ -3785,7 +3785,10 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR (oldRect.isValid() == false || newRect.isValid() == false) || // the position update is a part of a drag-and-drop operation - QDragManager::self()->object + QDragManager::self()->object || + + // we are on Panther (no HIViewSetNeedsDisplayInRect) + QSysInfo::MacintoshVersion < QSysInfo::MV_10_4 ){ HIViewSetFrame(view, &bounds); return; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 94f3532..744d20f 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -315,7 +315,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de id = (WId)control; setWinId(id); QT_TRAP_THROWING(control->ConstructL(true,desktop)); - + if (!desktop) { TInt stackingFlags; if ((q->windowType() & Qt::Popup) == Qt::Popup) { @@ -989,6 +989,32 @@ void QWidget::setWindowState(Qt::WindowStates newstate) return; if (isWindow()) { +#ifdef Q_WS_S60 + // Change window decoration visibility if switching to or from fullsccreen + // In addition decoration visibility is changed when the initial has been + // WindowNoState. + // The window decoration visibility has to be changed before doing actual + // window state change since in that order the availableGeometry will return + // directly the right size and we will avoid unnecessarty redraws + if((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen) || + oldstate == Qt::WindowNoState) { + CEikStatusPane* statusPane = S60->statusPane(); + CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); + if (newstate & Qt::WindowFullScreen) { + if (statusPane) + statusPane->MakeVisible(false); + if (buttonGroup) + buttonGroup->MakeVisible(false); + } else { + if (statusPane) + statusPane->MakeVisible(true); + if (buttonGroup) + buttonGroup->MakeVisible(true); + } + + } +#endif // Q_WS_S60 + createWinId(); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); QTLWExtra *top = d->topData(); @@ -1013,30 +1039,15 @@ void QWidget::setWindowState(Qt::WindowStates newstate) } } if ((oldstate & Qt::WindowFullScreen) != (newstate & Qt::WindowFullScreen)) { -#ifdef Q_WS_S60 - CEikStatusPane* statusPane = S60->statusPane(); - CEikButtonGroupContainer* buttonGroup = S60->buttonGroupContainer(); -#endif if (newstate & Qt::WindowFullScreen) { const QRect normalGeometry = geometry(); const QRect r = top->normalGeometry; setGeometry(qApp->desktop()->screenGeometry(this)); -#ifdef Q_WS_S60 - if (statusPane) - statusPane->MakeVisible(false); - if (buttonGroup) - buttonGroup->MakeVisible(false); -#endif + top->normalGeometry = r; if (top->normalGeometry.width() < 0) top->normalGeometry = normalGeometry; } else { -#ifdef Q_WS_S60 - if (statusPane) - statusPane->MakeVisible(true); - if (buttonGroup) - buttonGroup->MakeVisible(true); -#endif if (newstate & Qt::WindowMaximized) { const QRect r = top->normalGeometry; setGeometry(qApp->desktop()->availableGeometry(this)); @@ -1199,10 +1210,9 @@ void QWidget::activateWindow() Q_D(QWidget); QWidget *tlw = window(); if (tlw->isVisible()) { - S60->windowGroup().SetOrdinalPosition(0); window()->createWinId(); - RDrawableWindow* rw = tlw->d_func()->topData()->rwindow; - rw->SetOrdinalPosition(0); + WId id = tlw->internalWinId(); + id->SetFocus(true); } } QT_END_NAMESPACE |