summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-08-16 16:02:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-16 16:02:19 +0200
commite72785547696146f6172f0ef2824033e17df7b50 (patch)
treee78d6bafd7b3bcd9e786b5da8150cf02dcf2b4bb /src/gui/kernel
parentac5c64fccd6d491ee3b3a3f54460ed3464d714fc (diff)
parent5c23199d4e8ff21661dfa5aacc13149178e78cab (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/kernel/qopenglcontext_p.h7
-rw-r--r--src/gui/kernel/qplatformscreen.cpp4
3 files changed, 12 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index da3bc86433..6be3b066d8 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1885,7 +1885,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();
}
}
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)
{
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();
}