diff options
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_mac.mm | 1 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_qpa.cpp | 16 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_qws.cpp | 24 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 34 | ||||
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 2 | ||||
-rw-r--r-- | src/gui/kernel/qdesktopwidget.qdoc | 10 | ||||
-rw-r--r-- | src/gui/kernel/qdnd_x11.cpp | 28 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_s60.cpp | 66 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_s60_p.h | 27 | ||||
-rw-r--r-- | src/gui/kernel/qplatformclipboard_qpa.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qplatformclipboard_qpa.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qsessionmanager_qws.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 14 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_common_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qsoftkeymanager_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_qpa.cpp | 11 |
16 files changed, 92 insertions, 154 deletions
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index cb1f0cd..343b68f 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -715,6 +715,7 @@ void qt_event_request_showsheet(QWidget *w) { Q_ASSERT(qt_mac_is_macsheet(w)); #ifdef QT_MAC_USE_COCOA + w->repaint(); [NSApp beginSheet:qt_mac_window_for(w) modalForWindow:qt_mac_window_for(w->parentWidget()) modalDelegate:nil didEndSelector:nil contextInfo:0]; #else diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index 1059ead..b23c15c 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -615,6 +615,9 @@ void QApplication::setMainWidget(QWidget *mainWidget) void QApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e) { + if (!e->widget) + return; + // qDebug() << "handleMouseEvent" << tlw << ev.pos() << ev.globalPos() << hex << ev.buttons(); static QWeakPointer<QWidget> implicit_mouse_grabber; @@ -771,6 +774,10 @@ void QApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mouse void QApplicationPrivate::processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e) { + + if (!e->widget) + return; + // QPoint localPoint = ev.pos(); QPoint globalPoint = e->globalPos; // bool trustLocalPoint = !!tlw; //is there something the local point can be local to? @@ -845,12 +852,18 @@ void QApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEven void QApplicationPrivate::processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e) { + if (!e->enter) + return; + QApplicationPrivate::dispatchEnterLeave(e->enter.data(),0); qt_last_mouse_receiver = e->enter.data(); } void QApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e) { + if (!e->leave) + return; + QApplicationPrivate::dispatchEnterLeave(0,qt_last_mouse_receiver); if (e->leave.data() && !e->leave.data()->isAncestorOf(qt_last_mouse_receiver)) //(???) this should not happen @@ -861,6 +874,9 @@ void QApplicationPrivate::processLeaveEvent(QWindowSystemInterfacePrivate::Leave void QApplicationPrivate::processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e) { + if (!e->activated) + return; + QApplication::setActiveWindow(e->activated.data()); } diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp index 14f7790..1197c77 100644 --- a/src/gui/kernel/qapplication_qws.cpp +++ b/src/gui/kernel/qapplication_qws.cpp @@ -112,19 +112,6 @@ #include <qvfbhdr.h> -#ifndef QT_NO_QWS_MULTIPROCESS -#ifdef QT_NO_QSHM -#include <sys/ipc.h> -#include <sys/shm.h> -#ifndef Q_OS_DARWIN -# include <sys/sem.h> -#endif -#include <sys/socket.h> -#else -#include "private/qwssharedmemory_p.h" -#endif -#endif - QT_BEGIN_NAMESPACE #ifndef QT_NO_DIRECTPAINTER @@ -230,7 +217,7 @@ QString qws_dataDir() qFatal("Qt for Embedded Linux data directory has incorrect permissions: %s", dataDir.constData()); #endif - result.append("/"); + result.append(QLatin1Char('/')); return result; } @@ -3565,13 +3552,8 @@ bool QETWidget::translateKeyEvent(const QWSKeyEvent *event, bool grab) /* grab i QEvent::KeyPress : QEvent::KeyRelease; bool autor = event->simpleData.is_auto_repeat; QString text; - char ascii = 0; - if (event->simpleData.unicode) { - QChar ch(event->simpleData.unicode); - if (ch.unicode() != 0xffff) - text += ch; - ascii = ch.toLatin1(); - } + if (event->simpleData.unicode && event->simpleData.unicode != 0xffff) + text += QChar(event->simpleData.unicode); code = event->simpleData.keycode; #if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index e9d58c7..31d02d4 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -74,6 +74,7 @@ # include <centralrepository.h> # include "qs60mainappui.h" # include "qinputcontext.h" +# include <private/qgraphicssystemex_symbian_p.h> #endif #if defined(Q_WS_S60) @@ -1694,7 +1695,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) if (commandLine) { // After this construction, CEikonEnv will be available from CEikonEnv::Static(). // (much like our qApp). - QtEikonEnv* coe = new QtEikonEnv; + CEikonEnv* coe = new CEikonEnv; //not using QT_TRAP_THROWING, because coe owns the cleanupstack so it can't be pushed there. TRAPD(err, coe->ConstructAppFromCommandLineL(factory, *commandLine)); if(err != KErrNone) { @@ -1850,26 +1851,12 @@ void qt_init(QApplicationPrivate * /* priv */, int) #ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE QApplicationPrivate::instance()->useTranslucentEGLSurfaces = true; - const TUid KIvePropertyCat = {0x2726beef}; - enum TIvePropertyChipType { - EVCBCM2727B1 = 0x00000000, - EVCBCM2763A0 = 0x04000100, - EVCBCM2763B0 = 0x04000102, - EVCBCM2763C0 = 0x04000103, - EVCBCM2763C1 = 0x04000104, - EVCBCMUnknown = 0x7fffffff - }; - - TInt chipType = EVCBCMUnknown; - if (RProperty::Get(KIvePropertyCat, 0 /*chip type*/, chipType) == KErrNone) { - if (chipType == EVCBCM2727B1) { - // We have only 32MB GPU memory. Use raster surfaces - // for transparent TLWs. - QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false; - } - } else { + if (QSymbianGraphicsSystemEx::hasBCM2727()) { + // We have only 32MB GPU memory. Use raster surfaces + // for transparent TLWs. QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false; } + if (QApplicationPrivate::graphics_system_name == QLatin1String("raster")) QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false; #else @@ -2027,7 +2014,7 @@ void QApplicationPrivate::openPopup(QWidget *popup) QApplicationPrivate::popupWidgets->append(popup); // Cancel focus widget pointer capture and long tap timer - if (QApplication::focusWidget()) { + if (QApplication::focusWidget() && QApplication::focusWidget()->effectiveWinId()) { static_cast<QSymbianControl*>(QApplication::focusWidget()->effectiveWinId())->CancelLongTapTimer(); QApplication::focusWidget()->effectiveWinId()->SetPointerCapture(false); } @@ -2278,6 +2265,7 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent #if defined(Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS) case EEventDisplayChanged: #endif + { if (callSymbianEventFilters(symbianEvent)) return 1; if (S60) @@ -2289,6 +2277,12 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent QResizeEvent e(qt_desktopWidget->size(), oldSize); QApplication::sendEvent(qt_desktopWidget, &e); } + // Close non-native QMenus (that should act like context menus, i.e. close + // automatically when the orientation changes). + QMenu *activeMenu = qobject_cast<QMenu *>(QApplication::activePopupWidget()); + if (activeMenu) + activeMenu->close(); + } return 0; // Propagate to CONE case EEventWindowVisibilityChanged: if (controlInMap) { diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 13ff85b..e32fdeb 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -320,7 +320,7 @@ static int qCocoaViewCount = 0; } - CGContextFlush(context); + CGContextSynchronize(context); qt_mac_release_graphics_context(context); return; } diff --git a/src/gui/kernel/qdesktopwidget.qdoc b/src/gui/kernel/qdesktopwidget.qdoc index f71155e..b93bcb3 100644 --- a/src/gui/kernel/qdesktopwidget.qdoc +++ b/src/gui/kernel/qdesktopwidget.qdoc @@ -151,6 +151,11 @@ on Mac OS X, or the task bar on Windows). The default screen is used if \a screen is -1. + \note In Symbian devices the available geometry reported by QDesktopWidget is + not guaranteed to be correct at the time the geometry change resize event + is passed to widgets. The correct way to listen for available geometry changes + is to connect to the workAreaResized() signal of QDesktopWidget. + \sa screenNumber(), screenGeometry() */ @@ -179,6 +184,11 @@ Returns the geometry of the screen with index \a screen. The default screen is used if \a screen is -1. + \note In Symbian devices the screen geometry reported by QDesktopWidget is + not guaranteed to be correct at the time the geometry change resize event + is passed to widgets. The correct way to listen for screen geometry changes + is to connect to the resized() signal of QDesktopWidget. + \sa screenNumber() */ diff --git a/src/gui/kernel/qdnd_x11.cpp b/src/gui/kernel/qdnd_x11.cpp index 750ddf8..0c683b4 100644 --- a/src/gui/kernel/qdnd_x11.cpp +++ b/src/gui/kernel/qdnd_x11.cpp @@ -1166,12 +1166,20 @@ void QX11Data::xdndHandleDrop(QWidget *, const XEvent * xe, bool passive) // some XEMBEDding, so try to find the real QMimeData used // based on the timestamp for this drop. QMimeData *dropData = 0; - int at = findXdndDropTransactionByTime(qt_xdnd_target_current_time); - if (at != -1) + const int at = findXdndDropTransactionByTime(qt_xdnd_target_current_time); + if (at != -1) { dropData = QDragManager::dragPrivate(X11->dndDropTransactions.at(at).object)->data; + // Can't use the source QMimeData if we need the image conversion code from xdndObtainData + if (dropData && dropData->hasImage()) + dropData = 0; + } // if we can't find it, then use the data in the drag manager - if (!dropData) - dropData = (manager->object) ? manager->dragPrivate()->data : manager->dropData; + if (!dropData) { + if (manager->object && !manager->dragPrivate()->data->hasImage()) + dropData = manager->dragPrivate()->data; + else + dropData = manager->dropData; + } // Drop coming from another app? Update keyboard modifiers. if (!qt_xdnd_dragging) { @@ -1855,8 +1863,16 @@ static QVariant xdndObtainData(const char *format, QVariant::Type requestedType) && (!(w->windowType() == Qt::Desktop) || w->acceptDrops())) { QDragPrivate * o = QDragManager::self()->dragPrivate(); - if (o->data->hasFormat(QLatin1String(format))) - result = o->data->data(QLatin1String(format)); + const QString mimeType = QString::fromLatin1(format); + if (o->data->hasFormat(mimeType)) { + result = o->data->data(mimeType); + } else if (mimeType.startsWith(QLatin1String("image/")) && o->data->hasImage()) { + // ### duplicated from QInternalMimeData::renderDataHelper + QImage image = qvariant_cast<QImage>(o->data->imageData()); + QBuffer buf(&result); + buf.open(QBuffer::WriteOnly); + image.save(&buf, mimeType.mid(mimeType.indexOf(QLatin1Char('/')) + 1).toLatin1().toUpper()); + } return result; } diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp index 3f20c08..d5a2761 100644 --- a/src/gui/kernel/qeventdispatcher_s60.cpp +++ b/src/gui/kernel/qeventdispatcher_s60.cpp @@ -45,62 +45,6 @@ QT_BEGIN_NAMESPACE -QtEikonEnv::QtEikonEnv() - : m_lastIterationCount(0) - , m_savedStatusCode(KRequestPending) - , m_hasAlreadyRun(false) -{ -} - -QtEikonEnv::~QtEikonEnv() -{ -} - -void QtEikonEnv::RunL() -{ - QEventDispatcherS60 *dispatcher = qobject_cast<QEventDispatcherS60 *>(QAbstractEventDispatcher::instance()); - if (!dispatcher) { - CEikonEnv::RunL(); - return; - } - - if (m_lastIterationCount != dispatcher->iterationCount()) { - m_hasAlreadyRun = false; - m_lastIterationCount = dispatcher->iterationCount(); - } - - if (m_hasAlreadyRun) { - // Fool the active scheduler into believing we are still waiting for events. - // The window server thinks we are not, however. - m_savedStatusCode = iStatus.Int(); - iStatus = KRequestPending; - SetActive(); - dispatcher->queueDeferredActiveObjectsCompletion(); - } else { - m_hasAlreadyRun = true; - CEikonEnv::RunL(); - } -} - -void QtEikonEnv::DoCancel() -{ - complete(); - - CEikonEnv::DoCancel(); -} - -void QtEikonEnv::complete() -{ - if (m_hasAlreadyRun) { - if (m_savedStatusCode != KRequestPending) { - TRequestStatus *status = &iStatus; - QEventDispatcherSymbian::RequestComplete(status, m_savedStatusCode); - m_savedStatusCode = KRequestPending; - } - m_hasAlreadyRun = false; - } -} - QEventDispatcherS60::QEventDispatcherS60(QObject *parent) : QEventDispatcherSymbian(parent), m_noInputEvents(false) @@ -183,14 +127,4 @@ void QEventDispatcherS60::removeInputEventsForWidget(QObject *object) } } -// reimpl -void QEventDispatcherS60::reactivateDeferredActiveObjects() -{ - if (S60->qtOwnsS60Environment) { - static_cast<QtEikonEnv *>(CCoeEnv::Static())->complete(); - } - - QEventDispatcherSymbian::reactivateDeferredActiveObjects(); -} - QT_END_NAMESPACE diff --git a/src/gui/kernel/qeventdispatcher_s60_p.h b/src/gui/kernel/qeventdispatcher_s60_p.h index 49ec568..c7cf2b2 100644 --- a/src/gui/kernel/qeventdispatcher_s60_p.h +++ b/src/gui/kernel/qeventdispatcher_s60_p.h @@ -62,31 +62,6 @@ QT_BEGIN_NAMESPACE class QEventDispatcherS60; -class QtEikonEnv : public CEikonEnv -{ -public: - QtEikonEnv(); - ~QtEikonEnv(); - - // from CActive. - void RunL(); - void DoCancel(); - - void complete(); - -private: - // Workaround for a BC break from S60 3.2 -> 5.0, where the CEikonEnv override was removed. - // To avoid linking to that when we build against 3.2, define an empty body here. - // Reserved_*() have been verified to be empty in the S60 code. - void Reserved_1() {} - void Reserved_2() {} - -private: - int m_lastIterationCount; - TInt m_savedStatusCode; - bool m_hasAlreadyRun; -}; - class Q_GUI_EXPORT QEventDispatcherS60 : public QEventDispatcherSymbian { Q_OBJECT @@ -102,8 +77,6 @@ public: void saveInputEvent(QSymbianControl *control, QWidget *widget, QInputEvent *event); - void reactivateDeferredActiveObjects(); - private: bool sendDeferredInputEvents(); diff --git a/src/gui/kernel/qplatformclipboard_qpa.cpp b/src/gui/kernel/qplatformclipboard_qpa.cpp index 7905185..f8e4b62 100644 --- a/src/gui/kernel/qplatformclipboard_qpa.cpp +++ b/src/gui/kernel/qplatformclipboard_qpa.cpp @@ -83,7 +83,7 @@ QPlatformClipboard::~QPlatformClipboard() } -const QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode) const +QMimeData *QPlatformClipboard::mimeData(QClipboard::Mode mode) { //we know its clipboard Q_UNUSED(mode); diff --git a/src/gui/kernel/qplatformclipboard_qpa.h b/src/gui/kernel/qplatformclipboard_qpa.h index 41aa951..6a40fbc 100644 --- a/src/gui/kernel/qplatformclipboard_qpa.h +++ b/src/gui/kernel/qplatformclipboard_qpa.h @@ -59,7 +59,7 @@ class Q_GUI_EXPORT QPlatformClipboard public: virtual ~QPlatformClipboard(); - virtual const QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard ) const; + virtual QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard); virtual void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard); virtual bool supportsMode(QClipboard::Mode mode) const; void emitChanged(QClipboard::Mode mode); diff --git a/src/gui/kernel/qsessionmanager_qws.cpp b/src/gui/kernel/qsessionmanager_qws.cpp index efe688e..e437635 100644 --- a/src/gui/kernel/qsessionmanager_qws.cpp +++ b/src/gui/kernel/qsessionmanager_qws.cpp @@ -43,6 +43,9 @@ #ifndef QT_NO_SESSIONMANAGER +#include <qapplication.h> +#include <private/qobject_p.h> + QT_BEGIN_NAMESPACE class QSessionManagerPrivate : public QObjectPrivate diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 7d7c56f..57893f9 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -50,7 +50,7 @@ #include "private/qsoftkeymanager_s60_p.h" #endif -#ifdef SYMBIAN_VERSION_SYMBIAN3 +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) #include "private/qt_s60_p.h" #endif @@ -105,7 +105,7 @@ QSoftKeyManager::QSoftKeyManager() : QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *actionWidget) { QAction *action = new QAction(standardSoftKeyText(standardKey), actionWidget); -#ifdef SYMBIAN_VERSION_SYMBIAN3 +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) int key = 0; switch (standardKey) { case OkSoftKey: @@ -171,7 +171,7 @@ void QSoftKeyManager::cleanupHash(QObject *obj) Q_D(QSoftKeyManager); QAction *action = qobject_cast<QAction*>(obj); d->keyedActions.remove(action); -#ifdef SYMBIAN_VERSION_SYMBIAN3 +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) d->softKeyCommandActions.remove(action); #endif } @@ -193,9 +193,11 @@ void QSoftKeyManager::sendKeyEvent() void QSoftKeyManager::updateSoftKeys() { - QSoftKeyManager::instance()->d_func()->pendingUpdate = true; - QEvent *event = new QEvent(QEvent::UpdateSoftKeys); - QApplication::postEvent(QSoftKeyManager::instance(), event); + if (QApplication::activeWindow()) { + QSoftKeyManager::instance()->d_func()->pendingUpdate = true; + QEvent *event = new QEvent(QEvent::UpdateSoftKeys); + QApplication::postEvent(QSoftKeyManager::instance(), event); + } } bool QSoftKeyManager::appendSoftkeys(const QWidget &source, int level) diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h index bf4c747..5b76e60 100644 --- a/src/gui/kernel/qsoftkeymanager_common_p.h +++ b/src/gui/kernel/qsoftkeymanager_common_p.h @@ -72,7 +72,7 @@ protected: QMultiHash<int, QAction*> requestedSoftKeyActions; QWidget *initialSoftKeySource; bool pendingUpdate; -#ifdef SYMBIAN_VERSION_SYMBIAN3 +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) QHash<QAction*, int> softKeyCommandActions; #endif }; diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp index ab71064..acdb0e5 100644 --- a/src/gui/kernel/qsoftkeymanager_s60.cpp +++ b/src/gui/kernel/qsoftkeymanager_s60.cpp @@ -113,7 +113,7 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba) { -#ifdef SYMBIAN_VERSION_SYMBIAN3 +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) QT_TRAP_THROWING( //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3 cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC); @@ -297,7 +297,7 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba, QString text = softkeyText(*action); TPtrC nativeText = qt_QString2TPtrC(text); int command = S60_COMMAND_START + position; -#ifdef SYMBIAN_VERSION_SYMBIAN3 +#if defined(Q_WS_S60) && !defined(SYMBIAN_VERSION_9_4) if (softKeyCommandActions.contains(action)) command = softKeyCommandActions.value(action); #endif diff --git a/src/gui/kernel/qwidget_qpa.cpp b/src/gui/kernel/qwidget_qpa.cpp index 56d7d3f..661120c 100644 --- a/src/gui/kernel/qwidget_qpa.cpp +++ b/src/gui/kernel/qwidget_qpa.cpp @@ -739,12 +739,19 @@ QPlatformWindowFormat QWidget::platformWindowFormat() const { Q_D(const QWidget); + QPlatformWindowFormat format; + QTLWExtra *extra = d->maybeTopData(); if (extra){ - return extra->platformWindowFormat; + format = extra->platformWindowFormat; } else { - return QPlatformWindowFormat::defaultFormat(); + format = QPlatformWindowFormat::defaultFormat(); } + + if (testAttribute(Qt::WA_TranslucentBackground)) + format.setAlpha(true); + + return format; } void QWidgetPrivate::createSysExtra() |