I'm trying to drag the window with the mouse to implement custom window decorations, but this is proving to be a bit more painful that it probably should. The only way to move the window I can find is to set the position with WindowPosition::At(new_pos) However, to find the current window position, you need to look at the WindowMove events - ideally we could just call window.position() to get the current window position.
Finally, to drag the window, I take the latest position, and add the mouse delta. The issue here is that the window keeps moving when it reaches the edge of the screen, because mouse deltas are still sent when the cursor runs into the edge of a screen.
Is there a less complicated way to do this? I swear I prototyped this a year back and it was way simpler.