summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-10-31 12:32:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-02 12:17:27 +0100
commit300534fc214f2547a63594ce0891e9a54c8f33ca (patch)
tree5ebb0d425a84b61e789b4dcadde62d08c4d0b6aa /src/plugins/platforms
parent6be78c0712aa4290fed9cf985a52a74869ee85f0 (diff)
Added MultipleWindows platform capability.
Several platform plugins, like eglfs, kms, etc don't support multiple windows as there's no system compositor, they're rendering directly to a single back buffer. By adding a platform capability we'll be able to provide better error reporting when an application tries to create multiple QWindows on a single-window platform. Also, QML apps can use this capability to figure out whether they should create a QWindow for dialogs / popups / menus, or whether to just create items in the same scene, that are shown on top of the rest of the content. Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.mm1
-rw-r--r--src/plugins/platforms/minimal/qminimalintegration.cpp1
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp1
4 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
index 2fdb367c62..481055aae4 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm
@@ -309,6 +309,7 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
case ThreadedOpenGL:
case BufferQueueingOpenGL:
case WindowMasks:
+ case MultipleWindows:
return true;
default:
return QPlatformIntegration::hasCapability(cap);
diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp
index 6a2db91e34..e9fab6d87c 100644
--- a/src/plugins/platforms/minimal/qminimalintegration.cpp
+++ b/src/plugins/platforms/minimal/qminimalintegration.cpp
@@ -74,6 +74,7 @@ bool QMinimalIntegration::hasCapability(QPlatformIntegration::Capability cap) co
{
switch (cap) {
case ThreadedPixmaps: return true;
+ case MultipleWindows: return true;
default: return QPlatformIntegration::hasCapability(cap);
}
}
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 3f030ffca7..a02f0cd494 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -338,6 +338,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
#endif // !QT_NO_OPENGL
case WindowMasks:
return true;
+ case MultipleWindows:
+ return true;
default:
return QPlatformIntegration::hasCapability(cap);
}
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index a46d51127f..2ffe53c04b 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -216,6 +216,7 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const
#endif
case ThreadedOpenGL: return false;
case WindowMasks: return true;
+ case MultipleWindows: return true;
default: return QPlatformIntegration::hasCapability(cap);
}
}