Before this patch, when moving a CSD client below a layershell surface -
like a panel that was configured with either the "top" or "overlay"
layers - we'd only send a matching release button event to the client but
not actually end the interactive move operation. That caused the drag to
continue even though the user already released the mouse button.
In comparison, SSD clients were not suffering from the same issue because
the initial mouse "down" event was not attached to any client surface and
thus it would not take the first early return because there was no surface
attached to the release event.
This patch fixes the issue by reordering the conditions where we return
early. It also ensures that when we finish the move, we still send the
release event to CSD clients.
Fixes: #1053
Reported-by: @DynamoFox (thanks)