[wayland] Sync ShellClient's geometry with internal QWindow's geometry
Update geometry when the referenced internal QWindow changes position. This makes the close button in PresentWindows work.
This commit is contained in:
parent
75bd798ad9
commit
2ff903e8b3
2 changed files with 12 additions and 1 deletions
|
@ -49,7 +49,7 @@ ShellClient::ShellClient(ShellSurfaceInterface *surface)
|
|||
ready_for_painting = false;
|
||||
}
|
||||
if (m_internalWindow) {
|
||||
setGeometry(m_internalWindow->geometry());
|
||||
updateInternalWindowGeometry();
|
||||
} else {
|
||||
setGeometry(QRect(QPoint(0, 0), m_clientSize));
|
||||
}
|
||||
|
@ -361,8 +361,18 @@ void ShellClient::findInternalWindow()
|
|||
continue;
|
||||
}
|
||||
m_internalWindow = w;
|
||||
connect(m_internalWindow, &QWindow::xChanged, this, &ShellClient::updateInternalWindowGeometry);
|
||||
connect(m_internalWindow, &QWindow::xChanged, this, &ShellClient::updateInternalWindowGeometry);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void ShellClient::updateInternalWindowGeometry()
|
||||
{
|
||||
if (!m_internalWindow) {
|
||||
return;
|
||||
}
|
||||
setGeometry(m_internalWindow->geometry());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ private:
|
|||
void destroyClient();
|
||||
void createWindowId();
|
||||
void findInternalWindow();
|
||||
void updateInternalWindowGeometry();
|
||||
static void deleteClient(ShellClient *c);
|
||||
|
||||
KWayland::Server::ShellSurfaceInterface *m_shellSurface;
|
||||
|
|
Loading…
Reference in a new issue