summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformintegration.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-04-15 11:23:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-18 09:18:43 +0200
commiteb95685556143eb71323742bfcdaa20541b01375 (patch)
treecb54d5314c95aa9eb9b1aa1f272e60aa7f38b702 /src/gui/kernel/qplatformintegration.cpp
parent1770f25857c7cfe21c36c0bda8a80a54b199bafe (diff)
Android: Don't crash when displaying multiple top-levels
While the raster platform plugin supports multiple top level windows, this is not supported on the GL plugin, so if you use GL or QtQuick2 in your app and use several top levels, the app would crash with an error message. A problem is that the top-level SurfaceView is a special overlay View and does not support being stacked in a layout. So instead, we let all windows share the same GL surface and draw on top of each other. This works fine for simple use cases. We implement a new platform capability to make sure no top level windows (even combobox popups and dialogs) get non-fullscreen geometries. That has never worked properly with the eglfs plugin. Task-number: QTBUG-30473 Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r--src/gui/kernel/qplatformintegration.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 70de75072c..8a0540efc2 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -210,6 +210,11 @@ QPlatformServices *QPlatformIntegration::services() const
\value ForeignWindows The platform allows creating QWindows which represent
native windows created by other processes or anyway created by using native
libraries.
+
+ \value NonFullScreenWindows The platform supports top-level windows which do not
+ fill the screen. The default implementation returns true. Returning false for
+ this will cause all windows, including dialogs and popups, to be resized to fill the
+ screen.
*/
@@ -227,8 +232,7 @@ QPlatformServices *QPlatformIntegration::services() const
bool QPlatformIntegration::hasCapability(Capability cap) const
{
- Q_UNUSED(cap);
- return false;
+ return cap == NonFullScreenWindows;
}
QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const