summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2013-09-13 16:34:48 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 12:06:03 +0200
commit7e2b238c507ee2fdea26f2b57512f337de2c5f85 (patch)
tree3fa598d19f89864321a0484e6c572ae39aea62df /src/gui
parentd18ccbb5be23eaea5eb5f1af2ae0fba334ab21d7 (diff)
Add a WindowManagement capability to QPlatformIntegration
To be set to false by eglfs and similar platforms where no real window management is provided. When this capability is not set, some of the changes done for QTBUG-26903 will be disabled, allowing dialogs to show up at their QDialog-chosen place on platforms where no WM is present and so windows are never repositioned by the system. Change-Id: If1dac3cd11f2a856913a51277431fe3ec644b719 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformintegration.cpp7
-rw-r--r--src/gui/kernel/qplatformintegration.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 06d2aa4fca..dc775bcb61 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -224,6 +224,11 @@ QPlatformServices *QPlatformIntegration::services() const
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.
+
+ \value WindowManagement The platform is based on a system that performs window
+ management. This includes the typical desktop platforms. Can be set to false on
+ platforms where no window management is available, meaning for example that windows
+ are never repositioned by the window manager. The default implementation returns true.
*/
@@ -241,7 +246,7 @@ QPlatformServices *QPlatformIntegration::services() const
bool QPlatformIntegration::hasCapability(Capability cap) const
{
- return cap == NonFullScreenWindows || cap == NativeWidgets;
+ return cap == NonFullScreenWindows || cap == NativeWidgets || cap == WindowManagement;
}
QPlatformPixmap *QPlatformIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index a98d332356..0204181ca6 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -93,7 +93,8 @@ public:
ApplicationState,
ForeignWindows,
NonFullScreenWindows,
- NativeWidgets
+ NativeWidgets,
+ WindowManagement
};
virtual ~QPlatformIntegration() { }