diff options
author | Scott Leggett <scott@sl.id.au> | 2018-05-27 22:45:14 +1000 |
---|---|---|
committer | Scott Leggett <scott@sl.id.au> | 2018-05-28 01:37:43 +1000 |
commit | 4cd304e4bacb255694bf63f8f1ccacd352a96144 (patch) | |
tree | 94fe3761d10f4dcd3ae01a058f0927be882f5827 /include/sway/input/cursor.h | |
parent | Focus containers only on entry. (diff) | |
download | sway-4cd304e4bacb255694bf63f8f1ccacd352a96144.tar.gz sway-4cd304e4bacb255694bf63f8f1ccacd352a96144.tar.zst sway-4cd304e4bacb255694bf63f8f1ccacd352a96144.zip |
Store previous position in sway_cursor.
Diffstat (limited to 'include/sway/input/cursor.h')
-rw-r--r-- | include/sway/input/cursor.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 2141361d..03cb8b83 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h | |||
@@ -6,6 +6,7 @@ | |||
6 | struct sway_cursor { | 6 | struct sway_cursor { |
7 | struct sway_seat *seat; | 7 | struct sway_seat *seat; |
8 | struct wlr_cursor *cursor; | 8 | struct wlr_cursor *cursor; |
9 | struct cursor_position *previous; | ||
9 | struct wlr_xcursor_manager *xcursor_manager; | 10 | struct wlr_xcursor_manager *xcursor_manager; |
10 | 11 | ||
11 | struct wl_client *image_client; | 12 | struct wl_client *image_client; |
@@ -27,10 +28,14 @@ struct sway_cursor { | |||
27 | struct wl_listener request_set_cursor; | 28 | struct wl_listener request_set_cursor; |
28 | }; | 29 | }; |
29 | 30 | ||
31 | struct cursor_position { | ||
32 | double x, y; | ||
33 | }; | ||
34 | |||
30 | void sway_cursor_destroy(struct sway_cursor *cursor); | 35 | void sway_cursor_destroy(struct sway_cursor *cursor); |
31 | struct sway_cursor *sway_cursor_create(struct sway_seat *seat); | 36 | struct sway_cursor *sway_cursor_create(struct sway_seat *seat); |
32 | void cursor_send_pointer_motion(struct sway_cursor *cursor, | 37 | void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, |
33 | double delta_x, double delta_y, uint32_t time_msec, bool allow_refocusing); | 38 | bool allow_refocusing); |
34 | void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec, | 39 | void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec, |
35 | uint32_t button, enum wlr_button_state state); | 40 | uint32_t button, enum wlr_button_state state); |
36 | 41 | ||