/* This function is a helper function for the wtk_frame_handler() function. It is called when a pointer MOVE event is sent to the resize window. This function either starts or continues a drag operation, depending on current state. */
static void wtk_handle_resize_move(struct wtk_frame *frame, struct win_pointer_event const *event)
/* This function is a helper function for the wtk_frame_handler() function. It is called when a pointer MOVE event is sent to the resize window. This function either starts or continues a drag operation, depending on current state. */
static void wtk_handle_resize_move(struct wtk_frame *frame, struct win_pointer_event const *event)
{
	switch (frame->state) {
	case WTK_FRAME_AWAITING_RESIZE:
		if (wtk_is_drag_threshold_exceeded(&(event->pos))) {
			wtk_start_drag(&(event->pos));
			frame->state = WTK_FRAME_RESIZING;
		}
		break;
	case WTK_FRAME_RESIZING:
		wtk_continue_drag(&(event->last_pos), &(event->pos));
		break;
	default:
		break;
	}
}