aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_cursor.h12
-rw-r--r--include/wlr/types/wlr_pointer.h4
2 files changed, 14 insertions, 2 deletions
diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h
index 380d8a6f..64a75e4f 100644
--- a/include/wlr/types/wlr_cursor.h
+++ b/include/wlr/types/wlr_cursor.h
@@ -32,14 +32,22 @@ void wlr_cursor_set_xcursor(struct wlr_cursor *cur, struct wlr_xcursor *xcur);
* 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.
*
+ * `dev` may be passed to respect device mapping constraints. If `dev` is NULL,
+ * device mapping constraints will be ignored.
+ *
* Returns true when the mouse warp was successful.
*/
-bool wlr_cursor_warp(struct wlr_cursor *cur, double x, double y);
+bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
+ double x, double y);
/**
* Move the cursor in the direction of the given x and y coordinates.
+ *
+ * `dev` may be passed to respect device mapping constraints. If `dev` is NULL,
+ * device mapping constraints will be ignored.
*/
-void wlr_cursor_move(struct wlr_cursor *cur, double delta_x, double delta_y);
+void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
+ double delta_x, double delta_y);
/**
* Attaches this input device to this cursor. The input device must be one of:
diff --git a/include/wlr/types/wlr_pointer.h b/include/wlr/types/wlr_pointer.h
index 13a2d045..9153963a 100644
--- a/include/wlr/types/wlr_pointer.h
+++ b/include/wlr/types/wlr_pointer.h
@@ -20,12 +20,14 @@ struct wlr_pointer {
};
struct wlr_event_pointer_motion {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
double delta_x, delta_y;
};
struct wlr_event_pointer_motion_absolute {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
double x_mm, y_mm;
@@ -33,6 +35,7 @@ struct wlr_event_pointer_motion_absolute {
};
struct wlr_event_pointer_button {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
uint32_t button;
@@ -52,6 +55,7 @@ enum wlr_axis_orientation {
};
struct wlr_event_pointer_axis {
+ struct wlr_input_device *device;
uint32_t time_sec;
uint64_t time_usec;
enum wlr_axis_source source;