They are not automatically cleaned up with the window on Windows, and we
might want to reconnect so we cannot rely on the process cleanup either.
DesktopWindow::~DesktopWindow()
{
+ // Don't leave any dangling grabs as they are not automatically
+ // cleaned up on all platforms
+ ungrabPointer();
+ ungrabKeyboard();
+
// Unregister all timeouts in case they get a change tro trigger
// again later when this object is already gone.
Fl::remove_timeout(handleGrab, this);