diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-19 10:34:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-19 10:34:00 -0500 |
commit | 9a4b40854be4bdafe91f1decbae8d8ce8e9df31a (patch) | |
tree | bbc2650f3bbdf6aefa697d1c983a1288a517f924 /include | |
parent | 358654e212dbb3423948e89d26a0da218ad49252 (diff) | |
parent | bd8cdf1e9ff0ba6a0e8f7c36fec7f7540c94fded (diff) |
Merge pull request #433 from acrisci/refactor/wlr-drag-icon
wlr- drag-icon
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/cursor.h | 18 | ||||
-rw-r--r-- | include/rootston/seat.h | 16 | ||||
-rw-r--r-- | include/wlr/types/wlr_data_device.h | 25 | ||||
-rw-r--r-- | include/wlr/types/wlr_seat.h | 2 |
4 files changed, 25 insertions, 36 deletions
diff --git a/include/rootston/cursor.h b/include/rootston/cursor.h index f0c9be89..e2a371bf 100644 --- a/include/rootston/cursor.h +++ b/include/rootston/cursor.h @@ -53,12 +53,6 @@ struct roots_cursor { struct wl_listener tool_axis; struct wl_listener tool_tip; - struct wl_listener pointer_grab_begin; - struct wl_listener pointer_grab_end; - - struct wl_listener touch_grab_begin; - struct wl_listener touch_grab_end; - struct wl_listener request_set_cursor; }; @@ -96,16 +90,4 @@ void roots_cursor_handle_tool_tip(struct roots_cursor *cursor, void roots_cursor_handle_request_set_cursor(struct roots_cursor *cursor, struct wlr_seat_pointer_request_set_cursor_event *event); -void roots_cursor_handle_pointer_grab_begin(struct roots_cursor *cursor, - struct wlr_seat_pointer_grab *grab); - -void roots_cursor_handle_pointer_grab_end(struct roots_cursor *cursor, - struct wlr_seat_pointer_grab *grab); - -void roots_cursor_handle_touch_grab_begin(struct roots_cursor *cursor, - struct wlr_seat_touch_grab *grab); - -void roots_cursor_handle_touch_grab_end(struct roots_cursor *cursor, - struct wlr_seat_touch_grab *grab); - #endif diff --git a/include/rootston/seat.h b/include/rootston/seat.h index aebd4399..dad8bbc4 100644 --- a/include/rootston/seat.h +++ b/include/rootston/seat.h @@ -4,27 +4,11 @@ #include "rootston/input.h" #include "rootston/keyboard.h" -struct roots_drag_icon { - struct wlr_surface *surface; - struct wl_list link; // roots_seat::drag_icons - bool mapped; - - bool is_pointer; - int32_t touch_id; - - int32_t sx; - int32_t sy; - - struct wl_listener surface_destroy; - struct wl_listener surface_commit; -}; - struct roots_seat { struct roots_input *input; struct wlr_seat *seat; struct roots_cursor *cursor; struct wl_list link; - struct wl_list drag_icons; // coordinates of the first touch point if it exists int32_t touch_id; diff --git a/include/wlr/types/wlr_data_device.h b/include/wlr/types/wlr_data_device.h index 189ab59b..7ee6cec1 100644 --- a/include/wlr/types/wlr_data_device.h +++ b/include/wlr/types/wlr_data_device.h @@ -53,6 +53,27 @@ struct wlr_data_source { } events; }; +struct wlr_drag_icon { + struct wlr_surface *surface; + struct wlr_seat_client *client; + struct wl_list link; // wlr_seat::drag_icons + bool mapped; + + bool is_pointer; + int32_t touch_id; + + int32_t sx; + int32_t sy; + + struct { + struct wl_signal destroy; + } events; + + struct wl_listener surface_destroy; + struct wl_listener surface_commit; + struct wl_listener seat_client_unbound; +}; + struct wlr_drag { struct wlr_seat_pointer_grab pointer_grab; struct wlr_seat_keyboard_grab keyboard_grab; @@ -64,7 +85,7 @@ struct wlr_drag { bool is_pointer_grab; - struct wlr_surface *icon; + struct wlr_drag_icon *icon; struct wlr_surface *focus; struct wlr_data_source *source; @@ -72,9 +93,9 @@ struct wlr_drag { int32_t grab_touch_id; struct wl_listener point_destroy; - struct wl_listener icon_destroy; struct wl_listener source_destroy; struct wl_listener seat_client_unbound; + struct wl_listener icon_destroy; }; /** diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h index dbd03401..b5c06718 100644 --- a/include/wlr/types/wlr_seat.h +++ b/include/wlr/types/wlr_seat.h @@ -165,6 +165,8 @@ struct wlr_seat { struct wl_global *wl_global; struct wl_display *display; struct wl_list clients; + struct wl_list drag_icons; // wlr_drag_icon::link + char *name; uint32_t capabilities; struct timespec last_event; |