aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/seat.h
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-06-09 10:50:34 -0700
committerLibravatar GitHub <noreply@github.com>2018-06-09 10:50:34 -0700
commit867fb6aedbbe4cd1c7f4817848682609e8489880 (patch)
tree3b62f78586a18a17b577c82d48f7e02b0becfaa9 /include/sway/input/seat.h
parentMerge pull request #2047 from natesymer/master (diff)
parentRender drag icons (diff)
downloadsway-bbee3bfdcca62606b0b17a51efbf674b5de013d6.tar.gz
sway-bbee3bfdcca62606b0b17a51efbf674b5de013d6.tar.zst
sway-bbee3bfdcca62606b0b17a51efbf674b5de013d6.zip
Merge pull request #2124 from emersion/drag-icons1.0-alpha.3
Render drag icons
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r--include/sway/input/seat.h20
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
24struct 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
24struct sway_seat { 37struct 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
115bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface); 133bool seat_is_input_allowed(struct sway_seat *seat, struct wlr_surface *surface);
116 134
135void drag_icon_update_position(struct sway_drag_icon *icon);
136
117#endif 137#endif