From 06098bef98ec515584ab8007cbf7a104f2d67980 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Sun, 27 May 2018 14:52:40 +1000 Subject: Focus containers only on entry. --- include/sway/input/cursor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 42c894a4..2141361d 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -29,8 +29,8 @@ 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); +void cursor_send_pointer_motion(struct sway_cursor *cursor, + double delta_x, double delta_y, uint32_t time_msec, bool allow_refocusing); void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec, uint32_t button, enum wlr_button_state state); -- cgit v1.2.3 From 4cd304e4bacb255694bf63f8f1ccacd352a96144 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Sun, 27 May 2018 22:45:14 +1000 Subject: Store previous position in sway_cursor. --- include/sway/input/cursor.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include') 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 @@ struct sway_cursor { struct sway_seat *seat; struct wlr_cursor *cursor; + struct cursor_position *previous; struct wlr_xcursor_manager *xcursor_manager; struct wl_client *image_client; @@ -27,10 +28,14 @@ struct sway_cursor { struct wl_listener request_set_cursor; }; +struct cursor_position { + double x, y; +}; + 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, - double delta_x, double delta_y, uint32_t time_msec, bool allow_refocusing); +void cursor_send_pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, + bool allow_refocusing); void dispatch_cursor_button(struct sway_cursor *cursor, uint32_t time_msec, uint32_t button, enum wlr_button_state state); -- cgit v1.2.3 From 1b8de3928714950d715053523d99aa1572ac63e0 Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Mon, 28 May 2018 02:14:19 +1000 Subject: Move previous cursor_position inline. --- include/sway/input/cursor.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/sway/input/cursor.h b/include/sway/input/cursor.h index 03cb8b83..5dd109ca 100644 --- a/include/sway/input/cursor.h +++ b/include/sway/input/cursor.h @@ -6,7 +6,9 @@ struct sway_cursor { struct sway_seat *seat; struct wlr_cursor *cursor; - struct cursor_position *previous; + struct { + double x, y; + } previous; struct wlr_xcursor_manager *xcursor_manager; struct wl_client *image_client; @@ -28,10 +30,6 @@ struct sway_cursor { struct wl_listener request_set_cursor; }; -struct cursor_position { - double x, y; -}; - 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, -- cgit v1.2.3