diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-24 13:37:06 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2014-11-24 13:39:13 +0100 |
commit | 34aba4724f196e34ed02cf50073f41968f119bb6 (patch) | |
tree | 0ebdfcabda989ab76ee6de53c6461553c7a767a5 /src/gui/kernel/qwindow.cpp | |
parent | b86b2a742afae118bf974c82ba966ddb0cae4afb (diff) | |
parent | b1cf07f495e10c93e53651ac03e46ebdaea0a97e (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
src/corelib/io/qiodevice.cpp
src/plugins/bearer/linux_common/qofonoservice_linux.cpp
src/plugins/bearer/linux_common/qofonoservice_linux_p.h
src/plugins/platforms/android/qandroidplatformtheme.cpp
src/tools/bootstrap/bootstrap.pro
src/widgets/styles/qmacstyle_mac.mm
Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index a3b7f38c80..fa99390af0 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1127,6 +1127,10 @@ Qt::WindowState QWindow::windowState() const This is a hint to the window manager that this window is a dialog or pop-up on behalf of the given window. + In order to cause the window to be centered above its transient parent by + default, depending on the window manager, it may also be necessary to call + setFlags() with a suitable \l Qt::WindowType (such as \c Qt::Dialog). + \sa transientParent(), parent() */ void QWindow::setTransientParent(QWindow *parent) @@ -1644,8 +1648,6 @@ QPlatformSurface *QWindow::surfaceHandle() const bool QWindow::setKeyboardGrabEnabled(bool grab) { Q_D(QWindow); - if (grab && QGuiApplicationPrivate::noGrab) - return false; if (d->platformWindow) return d->platformWindow->setKeyboardGrabEnabled(grab); return false; @@ -1663,8 +1665,6 @@ bool QWindow::setKeyboardGrabEnabled(bool grab) bool QWindow::setMouseGrabEnabled(bool grab) { Q_D(QWindow); - if (grab && QGuiApplicationPrivate::noGrab) - return false; if (d->platformWindow) return d->platformWindow->setMouseGrabEnabled(grab); return false; @@ -2352,7 +2352,7 @@ QWindow *QWindow::fromWinId(WId id) /*! Causes an alert to be shown for \a msec miliseconds. If \a msec is \c 0 (the default), then the alert is shown indefinitely until the window becomes - active again. + active again. This function has no effect on an active window. In alert state, the window indicates that it demands attention, for example by flashing or bouncing the taskbar entry. @@ -2363,7 +2363,7 @@ QWindow *QWindow::fromWinId(WId id) void QWindow::alert(int msec) { Q_D(QWindow); - if (!d->platformWindow || d->platformWindow->isAlertState()) + if (!d->platformWindow || d->platformWindow->isAlertState() || isActive()) return; d->platformWindow->setAlertState(true); if (d->platformWindow->isAlertState() && msec) |