There has been quite a bit of cleanup of the KWindowSystem API, including moving from QWidget* to QWindow*, moving X11-only things to KX11Extras, deprecating some unused things.
There may be more that can be cleaned up though:
[x] raiseWindow(Wid). Applications should use QWindow::raise. If Plasma needs it then perhaps move to KX11Extras
[] How do KWindowSystem::activateWindow and QWindow::requestActivate relate?
[x] setType smells X11-ish
[x] setState smells X11-ish, also unergonomic API and also partically covered by QWindow API
[x] ditto for clearState
[x] allowedActionsSupported smells X11-ish https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/93
[] viewportToDesktop and friends are marked as internal but exposed in the API. Also viewport is a fishy concept
[] setCurrentXdgActivationToken: Create unified abstraction for X11 and Wayland?
[] KWindowInfo:: How much of it is actually used?
[x] Make KWindowSystem not inherit NET
[x] allowExternalProcessWindowActivation is a Windows-ism