graesslin added a comment.
What I absolutely don't understand is why you want to make it modal. I don't see a reason for this to be modal and the X11 variant where this was used is not modal. E.g. kwallet is not modal, polkit is not modal and a file dialog through a flatpack portal should not be modal . Furthermore our Wayland implementation does not even support any modal windows yet: AbstractClient *ShellClient::findModal(bool allow_itself) { Q_UNUSED(allow_itself) return nullptr; } INLINE COMMENTS > shell_client.h:64-66 > + KWayland::Server::XdgShellSurfaceInterface *xdgShellSurface() const { > + return m_xdgShellSurface; > + } I don't see this new method being used. > wayland_server.cpp:166-173 > + if (findClient(parent) == client) { > + if (childClient && client && client->surface() == parent) { > + childClient->setModal(true); > + } > + //we are the child, just manage parent lost in this case > + } else if (childClient == client && !parent) { > + childClient->setModal(false); why the setModal? Why should a foreign transient be modal? > wayland_server.cpp:174 > + } > + emit foreignTransientChanged(child, parent); > + }); as an alternative feel free to make ShellClient::setTransient public (it's only private because nothing used it so far) and do: if (childClient && childClient->surface() == child) { childClient->setTransient(); } > wayland_server.h:198 > void initialized(); > + void foreignTransientChanged(KWayland::Server::SurfaceInterface *child, > KWayland::Server::SurfaceInterface *parent); > why add the parent if it's never used? REPOSITORY R108 KWin REVISION DETAIL https://phabricator.kde.org/D7521 To: mart, #plasma, graesslin Cc: graesslin, davidedmundson, plasma-devel, kwin, #kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, lukas