From 9eeb1bd4d44b71c4251090e9f3b7427a493d873d Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 29 Jul 2013 13:49:42 +0200 Subject: Add workaround for GL on Android emulator On the Android Emulator, the shaders will be compiled by a desktop GL driver, since the GL driver in the emulator is just a thin wrapper. The GL driver does not necessarily support the precision qualifiers, which can cause applications to break. We detect this at runtime in the platform plugin and set a workaround flag to Task-number: QTBUG-32557 Change-Id: Ied00cfe8e804d1f7862697dd379a14f3bed3d980 Reviewed-by: Gunnar Sletta --- src/gui/kernel/qopenglcontext_p.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 3cbcd1c06d..280e2e1e33 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -203,6 +203,7 @@ public: , max_texture_size(-1) , workaround_brokenFBOReadBack(false) , workaround_brokenTexSubImage(false) + , workaround_missingPrecisionQualifiers(false) , active_engine(0) { } @@ -233,6 +234,7 @@ public: bool workaround_brokenFBOReadBack; bool workaround_brokenTexSubImage; + bool workaround_missingPrecisionQualifiers; QPaintEngineEx *active_engine; @@ -240,6 +242,11 @@ public: int maxTextureSize(); + static QOpenGLContextPrivate *get(QOpenGLContext *context) + { + return context->d_func(); + } + #if !defined(QT_NO_DEBUG) static bool toggleMakeCurrentTracker(QOpenGLContext *context, bool value) { -- cgit v1.2.3 From bbf19fb29572785ef9b7fcccd2d2027f5c7603a6 Mon Sep 17 00:00:00 2001 From: Daiwei Li Date: Thu, 1 Aug 2013 17:24:47 -0700 Subject: Fix ignoring closeEvents on OSX for QtQuick. The QCloseEvent's accepted state should not be inverted for the QWindowSystemInterfacePrivate::CloseEvent. To make Widgets work with this change, pass whether the close was accepted from close_helper to the QCloseEvent generated by QGuiApplication. Task-number: QTBUG-28965 Change-Id: If384b0355776b93df02dff2ab78b5647903200e7 Reviewed-by: Gabriel de Dietrich Reviewed-by: Josh Faust --- src/gui/kernel/qguiapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index bf8440cccf..7d2c710c52 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1778,7 +1778,7 @@ void QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::Cl QCloseEvent event; QGuiApplication::sendSpontaneousEvent(e->window.data(), &event); if (e->accepted) { - *(e->accepted) = !event.isAccepted(); + *(e->accepted) = event.isAccepted(); } } -- cgit v1.2.3 From 488f7a31ffbe86730d7dc885a3e71e8cc56b506f Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 6 Aug 2013 17:18:46 +0200 Subject: Don't crash if the QWindow's screen is temporarily invalid It can happen during the transition between screens when one screen is disconnected that the window doesn't have a screen. Task-number: QTBUG-32681 Change-Id: I066855a2ffe80f0680a3044e73f4f491c2c0eb5c Reviewed-by: Thiago Macieira Reviewed-by: Gunnar Sletta --- src/gui/kernel/qplatformscreen.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/kernel') diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index 43db0e5f8e..05d04ae4ee 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -232,6 +232,10 @@ void QPlatformScreen::setOrientationUpdateMask(Qt::ScreenOrientations mask) QPlatformScreen * QPlatformScreen::platformScreenForWindow(const QWindow *window) { + // QTBUG 32681: It can happen during the transition between screens + // when one screen is disconnected that the window doesn't have a screen. + if (!window->screen()) + return 0; return window->screen()->handle(); } -- cgit v1.2.3