diff options
author | emersion <contact@emersion.fr> | 2018-06-09 13:26:03 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-06-09 13:26:03 +0100 |
commit | cfd02918c0d5dc539bc8858c7d0fab378145b38c (patch) | |
tree | 97e8b185ec52b576c7411fe74bacb9f727583ecd /include/sway/input | |
parent | Merge pull request #2123 from emersion/fix-disabled-outputs (diff) | |
download | sway-cfd02918c0d5dc539bc8858c7d0fab378145b38c.tar.gz sway-cfd02918c0d5dc539bc8858c7d0fab378145b38c.tar.zst sway-cfd02918c0d5dc539bc8858c7d0fab378145b38c.zip |
Render drag icons
Diffstat (limited to 'include/sway/input')
-rw-r--r-- | include/sway/input/seat.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index 2e4da438..1f7792ba 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -21,6 +21,19 @@ struct sway_seat_container { | |||
21 | struct wl_listener destroy; | 21 | struct wl_listener destroy; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct sway_drag_icon { | ||
25 | struct sway_seat *seat; | ||
26 | struct wlr_drag_icon *wlr_drag_icon; | ||
27 | struct wl_list link; // sway_root::drag_icons | ||
28 | |||
29 | double x, y; // in layout-local coordinates | ||
30 | |||
31 | struct wl_listener surface_commit; | ||
32 | struct wl_listener map; | ||
33 | struct wl_listener unmap; | ||
34 | struct wl_listener destroy; | ||
35 | }; | ||
36 | |||
24 | struct sway_seat { | 37 | struct sway_seat { |
25 | struct wlr_seat *wlr_seat; | 38 | struct wlr_seat *wlr_seat; |
26 | struct sway_cursor *cursor; | 39 | struct sway_cursor *cursor; |
@@ -35,8 +48,13 @@ struct sway_seat { | |||
35 | // If exclusive_client is set, no other clients will receive input events | 48 | // If exclusive_client is set, no other clients will receive input events |
36 | struct wl_client *exclusive_client; | 49 | struct wl_client *exclusive_client; |
37 | 50 | ||
51 | // Last touch point | ||
52 | int32_t touch_id; | ||
53 | double touch_x, touch_y; | ||
54 | |||
38 | struct wl_listener focus_destroy; | 55 | struct wl_listener focus_destroy; |
39 | struct wl_listener new_container; | 56 | struct wl_listener new_container; |
57 | struct wl_listener new_drag_icon; | ||
40 | 58 | ||
41 | struct wl_list devices; // sway_seat_device::link | 59 | struct wl_list devices; // sway_seat_device::link |
42 | 60 | ||
@@ -114,4 +132,6 @@ struct seat_config *seat_get_config(struct sway_seat *seat); | |||
114 | 132 | ||
115 | bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface); | 133 | bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface); |
116 | 134 | ||
135 | void drag_icon_update_position(struct sway_drag_icon *icon); | ||
136 | |||
117 | #endif | 137 | #endif |