Sorry, but this is not possible to implement for a window manager. We lack information to identify that a window is the same as previous window. Please see Thomas's comments on that. As Thomas states this is clearly a client job and we can only do something in frameworks for KDE applications.
On Wayland we lack the same information and I don't see a possibility to add a spec adding the required functionality as it requires each and every application to change. Even Qt API doesn't provide anything to specify the required functionality.
Sorry, but this is not possible to implement for a window manager. We lack information to identify that a window is the same as previous window. Please see Thomas's comments on that. As Thomas states this is clearly a client job and we can only do something in frameworks for KDE applications.
On Wayland we lack the same information and I don't see a possibility to add a spec adding the required functionality as it requires each and every application to change. Even Qt API doesn't provide anything to specify the required functionality.