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());
|
setMask(window()->mask());
|
||||||
setWindowStateInternal(window()->windowState());
|
setWindowStateInternal(window()->windowState());
|
||||||
handleContentOrientationChange(window()->contentOrientation());
|
handleContentOrientationChange(window()->contentOrientation());
|
||||||
|
mFlags = window()->flags();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWaylandWindow::shouldCreateShellSurface() const
|
bool QWaylandWindow::shouldCreateShellSurface() const
|
||||||
@ -579,6 +580,9 @@ void QWaylandWindow::setWindowFlags(Qt::WindowFlags flags)
|
|||||||
{
|
{
|
||||||
if (mShellSurface)
|
if (mShellSurface)
|
||||||
mShellSurface->setWindowFlags(flags);
|
mShellSurface->setWindowFlags(flags);
|
||||||
|
|
||||||
|
mFlags = flags;
|
||||||
|
createDecoration();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWaylandWindow::createDecoration()
|
bool QWaylandWindow::createDecoration()
|
||||||
@ -613,9 +617,9 @@ bool QWaylandWindow::createDecoration()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (window()->flags() & Qt::FramelessWindowHint || isFullscreen())
|
if (mFlags & Qt::FramelessWindowHint || isFullscreen())
|
||||||
decoration = false;
|
decoration = false;
|
||||||
if (window()->flags() & Qt::BypassWindowManagerHint)
|
if (mFlags & Qt::BypassWindowManagerHint)
|
||||||
decoration = false;
|
decoration = false;
|
||||||
if (mSubSurfaceWindow)
|
if (mSubSurfaceWindow)
|
||||||
decoration = false;
|
decoration = false;
|
||||||
@ -663,6 +667,7 @@ bool QWaylandWindow::createDecoration()
|
|||||||
QMargins m = frameMargins();
|
QMargins m = frameMargins();
|
||||||
subsurf->set_position(pos.x() + m.left(), pos.y() + m.top());
|
subsurf->set_position(pos.x() + m.left(), pos.y() + m.top());
|
||||||
}
|
}
|
||||||
|
QWindowSystemInterface::handleExposeEvent(window(), QRect(QPoint(), geometry().size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return mWindowDecoration;
|
return mWindowDecoration;
|
||||||
|
@ -237,6 +237,7 @@ protected:
|
|||||||
QIcon mWindowIcon;
|
QIcon mWindowIcon;
|
||||||
|
|
||||||
Qt::WindowState mState;
|
Qt::WindowState mState;
|
||||||
|
Qt::WindowFlags mFlags;
|
||||||
QRegion mMask;
|
QRegion mMask;
|
||||||
|
|
||||||
QWaylandShmBackingStore *mBackingStore;
|
QWaylandShmBackingStore *mBackingStore;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user