aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-10-19 00:04:21 +1000
committerFurkan Sahin <furkan-dev@proton.me>2018-10-19 00:04:21 +1000
commitbe0c6e8524696baef4fb022510aa39edfcf5ec25 (patch)
treefbeb938d3bb175013a0224e95ab50bdf0a678ae8 /include
parentac377dbd220dfcd1969a796209dc30d5a1a16d85 (diff)
Introduce cursor_rebase
This function "rebases" the cursor on top of whatever is underneath it, without triggering any focus changes.
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/cursor.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h
index 299721f0..50ac453b 100644
--- a/include/sway/input/cursor.h
+++ b/include/sway/input/cursor.h
@@ -40,8 +40,20 @@ struct sway_cursor {
void sway_cursor_destroy(struct sway_cursor *cursor);
struct sway_cursor *sway_cursor_create(struct sway_seat *seat);
-void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
- bool allow_refocusing);
+
+/**
+ * "Rebase" a cursor on top of whatever view is underneath it.
+ *
+ * This chooses a cursor icon and sends a motion event to the surface.
+ */
+void cursor_rebase(struct sway_cursor *cursor);
+
+/**
+ * Like cursor_rebase, but also allows focus to change when the cursor enters a
+ * new container.
+ */
+void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec);
+
void dispatch_cursor_button(struct sway_cursor *cursor,
struct wlr_input_device *device, uint32_t time_msec, uint32_t button,
enum wlr_button_state state);