diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-06-14 11:52:09 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-06-28 09:07:28 +0000 |
commit | b0e4c8f427eaed8ce392be95e08913d2efe1d3a2 (patch) | |
tree | 7fb96c379be457fb320828788973d84af2e3f6ee /src/gui/kernel | |
parent | 84cc43413a8577245701e6890d821e3c701a2fb1 (diff) |
Remove requirement to call QWindow::setMask after creating window
Like other QWindow properties we can just store it, and the platform
window should pick it up on creation like other properties.
[ChangeLog][QtGui][QWindow] setMask() no longer requires the window
to be created to have an effect; it can be set at any time.
Change-Id: I55b616363801b770bd61bda5325b443013b99866
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 34d35ef2d1..9f20fe0855 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1062,15 +1062,12 @@ qreal QWindow::opacity() const The window manager may or may not choose to display any areas of the window not included in the mask, thus it is the application's responsibility to clear to transparent the areas that are not part of the mask. - - Setting the mask before the window has been created has no effect. */ void QWindow::setMask(const QRegion ®ion) { Q_D(QWindow); - if (!d->platformWindow) - return; - d->platformWindow->setMask(QHighDpi::toNativeLocalRegion(region, this)); + if (d->platformWindow) + d->platformWindow->setMask(QHighDpi::toNativeLocalRegion(region, this)); d->mask = region; } |