diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -95,17 +95,16 @@ createWindowId(); setupCompositing(); updateIcon(); - SurfaceInterface *s = surface(); - Q_ASSERT(s); doSetGeometry(QRect(QPoint(0, 0), m_clientSize)); - if (waylandServer()->inputMethodConnection() == s->client()) { + + if (waylandServer()->inputMethodConnection() == surface()->client()) { m_windowType = NET::OnScreenDisplay; } connect(surface(), &SurfaceInterface::sizeChanged, this, &XdgShellClient::handleSurfaceSizeChanged); - connect(s, &SurfaceInterface::unmapped, this, &XdgShellClient::unmap); - connect(s, &SurfaceInterface::unbound, this, &XdgShellClient::destroyClient); - connect(s, &SurfaceInterface::destroyed, this, &XdgShellClient::destroyClient); + connect(surface(), &SurfaceInterface::unmapped, this, &XdgShellClient::unmap); + connect(surface(), &SurfaceInterface::unbound, this, &XdgShellClient::destroyClient); + connect(surface(), &SurfaceInterface::destroyed, this, &XdgShellClient::destroyClient); if (m_xdgShellSurface) { connect(m_xdgShellSurface, &XdgShellSurfaceInterface::destroyed, this, &XdgShellClient::destroyClient); @@ -166,7 +165,7 @@ // setup shadow integration getShadow(); - connect(s, &SurfaceInterface::shadowChanged, this, &Toplevel::getShadow); + connect(surface(), &SurfaceInterface::shadowChanged, this, &Toplevel::getShadow); connect(waylandServer(), &WaylandServer::foreignTransientChanged, this, [this](KWayland::Server::SurfaceInterface *child) { if (child == surface()) { @@ -178,9 +177,9 @@ AbstractClient::updateColorScheme(QString()); } -void XdgShellClient::finishInit() { - SurfaceInterface *s = surface(); - disconnect(s, &SurfaceInterface::committed, this, &XdgShellClient::finishInit); +void XdgShellClient::finishInit() +{ + disconnect(surface(), &SurfaceInterface::committed, this, &XdgShellClient::finishInit); bool needsPlacement = !isInitialPositionSet();