Fix FramelessWindowHint
setFlags() works just like setWindowState(): we have to use the supplied parameter because the window's state hasn't been updated yet. Change-Id: I223e01ef192f30911697e449669e745f0ad59d99 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org>
This commit is contained in:
parent
6cb80c8a53
commit
df32477ff0
@ -196,6 +196,7 @@ void QWaylandWindow::initWindow()
|
||||
setMask(window()->mask());
|
||||
setWindowStateInternal(window()->windowState());
|
||||
handleContentOrientationChange(window()->contentOrientation());
|
||||
mFlags = window()->flags();
|
||||
}
|
||||
|
||||
bool QWaylandWindow::shouldCreateShellSurface() const
|
||||
@ -579,6 +580,9 @@ void QWaylandWindow::setWindowFlags(Qt::WindowFlags flags)
|
||||
{
|
||||
if (mShellSurface)
|
||||
mShellSurface->setWindowFlags(flags);
|
||||
|
||||
mFlags = flags;
|
||||
createDecoration();
|
||||
}
|
||||
|
||||
bool QWaylandWindow::createDecoration()
|
||||
@ -613,9 +617,9 @@ bool QWaylandWindow::createDecoration()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (window()->flags() & Qt::FramelessWindowHint || isFullscreen())
|
||||
if (mFlags & Qt::FramelessWindowHint || isFullscreen())
|
||||
decoration = false;
|
||||
if (window()->flags() & Qt::BypassWindowManagerHint)
|
||||
if (mFlags & Qt::BypassWindowManagerHint)
|
||||
decoration = false;
|
||||
if (mSubSurfaceWindow)
|
||||
decoration = false;
|
||||
@ -663,6 +667,7 @@ bool QWaylandWindow::createDecoration()
|
||||
QMargins m = frameMargins();
|
||||
subsurf->set_position(pos.x() + m.left(), pos.y() + m.top());
|
||||
}
|
||||
QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
|
||||
}
|
||||
|
||||
return mWindowDecoration;
|
||||
|
@ -237,6 +237,7 @@ protected:
|
||||
QIcon mWindowIcon;
|
||||
|
||||
Qt::WindowState mState;
|
||||
Qt::WindowFlags mFlags;
|
||||
QRegion mMask;
|
||||
|
||||
QWaylandShmBackingStore *mBackingStore;
|
||||
|
Loading…
x
Reference in New Issue
Block a user