summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-06-25 13:58:41 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-26 14:40:26 +0200
commit8e280d1e187b09651c7036bd76272342d52ce401 (patch)
tree9ddd14d0ec9690dc715bc4c6f60d1a0e2c47bf0d /src/gui/kernel
parent799f0841a6f22ccaa03f3673ba91ad7b40f20612 (diff)
QPlatformWindow: Add Window masks.
Add functionality for window masks to QPlatformWindow, which is required to implement QWidget::setMask() in order to fix the regression in functionality from Qt 4.8. Change-Id: I2c2d5629f0b4c6d90e52595ad70b13559aab1f41 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformintegration.h4
-rw-r--r--src/gui/kernel/qplatformwindow.h2
-rw-r--r--src/gui/kernel/qplatformwindow_qpa.cpp10
3 files changed, 14 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index 3990adb3fe..ea13a25bab 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -85,8 +85,8 @@ public:
OpenGL = 2,
ThreadedOpenGL = 3,
SharedGraphicsCache = 4,
- BufferQueueingOpenGL = 5
-
+ BufferQueueingOpenGL = 5,
+ WindowMasks = 6
};
virtual ~QPlatformIntegration() { }
diff --git a/src/gui/kernel/qplatformwindow.h b/src/gui/kernel/qplatformwindow.h
index 604398909d..d9f79f25eb 100644
--- a/src/gui/kernel/qplatformwindow.h
+++ b/src/gui/kernel/qplatformwindow.h
@@ -68,6 +68,7 @@ class QPlatformScreen;
class QPlatformWindowPrivate;
class QWindow;
class QIcon;
+class QRegion;
class Q_GUI_EXPORT QPlatformWindow : public QPlatformSurface
{
@@ -105,6 +106,7 @@ public:
virtual void propagateSizeHints();
virtual void setOpacity(qreal level);
+ virtual void setMask(const QRegion &region);
virtual void requestActivateWindow();
virtual void handleContentOrientationChange(Qt::ScreenOrientation orientation);
diff --git a/src/gui/kernel/qplatformwindow_qpa.cpp b/src/gui/kernel/qplatformwindow_qpa.cpp
index 2380c6db75..88f2a6481e 100644
--- a/src/gui/kernel/qplatformwindow_qpa.cpp
+++ b/src/gui/kernel/qplatformwindow_qpa.cpp
@@ -242,6 +242,16 @@ void QPlatformWindow::setOpacity(qreal level)
}
/*!
+ Reimplement to be able to let Qt set the mask of a window
+*/
+
+void QPlatformWindow::setMask(const QRegion &region)
+{
+ Q_UNUSED(region);
+ qWarning("This plugin does not support setting window masks");
+}
+
+/*!
Reimplement to let Qt be able to request activation/focus for a window
Some window systems will probably not have callbacks for this functionality,