summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-05-18 09:32:17 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-05-18 09:32:17 +0200
commit516f4e283ba4626d7239630397ef867ab0366071 (patch)
tree094e1a5347f26fe147323d74ce70080d110f96d3 /src/gui/kernel
parent10a3b10726d2f46b2a284ecb7533bb9226f8c7c8 (diff)
Add QWindow::setWindowModality().
Also set corresponding window manager hints in xcb plugin.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwindow.cpp18
-rw-r--r--src/gui/kernel/qwindow.h4
-rw-r--r--src/gui/kernel/qwindow_p.h2
3 files changed, 23 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 3b01a0d352..121791d2f3 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -152,6 +152,24 @@ bool QWindow::isTopLevel() const
return d->windowFlags & Qt::Window;
}
+bool QWindow::isModal() const
+{
+ Q_D(const QWindow);
+ return d->modality != Qt::NonModal;
+}
+
+Qt::WindowModality QWindow::windowModality() const
+{
+ Q_D(const QWindow);
+ return d->modality;
+}
+
+void QWindow::setWindowModality(Qt::WindowModality windowModality)
+{
+ Q_D(QWindow);
+ d->modality = windowModality;
+}
+
void QWindow::setWindowFormat(const QWindowFormat &format)
{
Q_D(QWindow);
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index 22dbf48538..de4e414703 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -96,7 +96,9 @@ public:
bool isTopLevel() const;
- QWindow *topLevelWindow() const;
+ bool isModal() const;
+ Qt::WindowModality windowModality() const;
+ void setWindowModality(Qt::WindowModality windowModality);
void setWindowFormat(const QWindowFormat &format);
QWindowFormat requestedWindowFormat() const;
diff --git a/src/gui/kernel/qwindow_p.h b/src/gui/kernel/qwindow_p.h
index 215a18d27e..f52dd559f1 100644
--- a/src/gui/kernel/qwindow_p.h
+++ b/src/gui/kernel/qwindow_p.h
@@ -92,6 +92,8 @@ public:
QSize maximumSize;
QSize baseSize;
QSize sizeIncrement;
+
+ Qt::WindowModality modality;
};