Skip to content

Commit 8089ee4

Browse files
zzxybzccrs
authored andcommitted
fix xwindow menu y-axis coordinate error
1 parent 4a467fa commit 8089ee4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/tinywl/surfacewrapper.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ void SurfaceWrapper::updateTitleBar()
491491
} else {
492492
m_titleBar = m_engine->createTitleBar(this, m_surfaceItem);
493493
m_titleBar->setZ(static_cast<int>(WSurfaceItem::ZOrder::ContentItem));
494+
if (type() == Type::XWayland) {
495+
auto xwaylandSurfaceItem = qobject_cast<WXWaylandSurfaceItem*>(m_surfaceItem);
496+
xwaylandSurfaceItem->moveTo(QPointF(0, m_titleBar->height()), !m_xwaylandPositionFromSurface);
497+
}
494498
m_surfaceItem->setTopPadding(m_titleBar->height());
495499
connect(m_titleBar, &QQuickItem::heightChanged, this, [this] {
496500
m_surfaceItem->setTopPadding(m_titleBar->height());

0 commit comments

Comments
 (0)