diff options
author | Andy Shaw <andy.shaw@qt.io> | 2017-08-15 10:29:16 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2017-08-16 13:13:55 +0000 |
commit | a3d59c7c7f675b0a4e128efeb781aa1c2f7db4c0 (patch) | |
tree | 21415c10b437ae37867e2df53b959051655546fe /src | |
parent | a26a3cfbc7cd5c87afeda63eb324a2ba2a4c8192 (diff) |
Block input to a window shown while an application modal dialog is visible
Although the window is refused input for the most part from the system,
it does not act like that it is blocked by the application modal dialog.
This ensures that it is the case and prevents things like being able to
double click on the title bar to maximize the window on Windows.
Task-number: QTBUG-49102
Change-Id: If1582819b90cb2ec9d891f664da24f13bfec7103
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index cf4a75dfce..eb9d7a8868 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -576,6 +576,8 @@ void QWindow::setVisible(bool visible) QGuiApplicationPrivate::showModalWindow(this); else QGuiApplicationPrivate::hideModalWindow(this); + } else if (visible && QGuiApplication::modalWindow()) { + QGuiApplicationPrivate::updateBlockedStatus(this); } #ifndef QT_NO_CURSOR |