From 0cba06dcef791d8dc1702270cae2915936380a46 Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Thu, 24 Aug 2017 10:42:05 -0400 Subject: implement wlr_cursor_warp --- include/wlr/types/wlr_cursor.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index 1ea089ef..380d8a6f 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -28,8 +28,17 @@ void wlr_cursor_destroy(struct wlr_cursor *cur); void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur); -void wlr_cursor_warp(struct wlr_cursor *cur, double x, double y); +/** + * Warp the cursor to the given x and y in layout coordinates. If x and y are + * out of the layout boundaries or constraints, no warp will happen. + * + * Returns true when the mouse warp was successful. + */ +bool wlr_cursor_warp(struct wlr_cursor *cur, double x, double y); +/** + * Move the cursor in the direction of the given x and y coordinates. + */ void wlr_cursor_move(struct wlr_cursor *cur, double delta_x, double delta_y); /** -- cgit v1.2.3