KWin Scripting: How to know if a resize was canceled when the interactive resize finished?

In a KWin script, when the interactiveMoveResizeFinished signal is triggered for a window, how do you know if this happened due to canceling the resizing (via Esc)?

Alternatively: How to get the final frameGeometry when the interactiveMoveResizeFinished signal is triggered?

With X11, the frameGeometry always seems to be up-to-date. However, with Wayland, as far as I understand, window resizing happens asynchronously. So the frameGeometry of the window might not be the final geometry after a resize yet when interactiveMoveResizeFinished triggers after the resizing was canceled via Esc.

If I have not missed something, with Wayland, it is currently impossible to know the final frameGeometry when resizing was canceled. I see two solutions:

  • interactiveMoveResizeStepped should be triggered again with the final geometry when resizing was canceled, or
  • it should be passed to interactiveMoveResizeFinished if resizing was canceled. (KWin knows about this.)

But maybe I actually missed something. I am happy about any suggestions.

PS: I noticed this problem while working on and using Sticky Window Snapping. With X11 it was enough for my purposes to just query frameGeometry when interactiveMoveResizeFinished triggered. However, with Wayland, this does not work anymore.