summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-11 11:03:43 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-06-11 11:03:43 +1000
commit9e96cfd310c4e5dc60f07d772e60b139ff7dc448 (patch)
tree9961c8705208b2f127133f0533bd305a6f75015e /include
parentRefactor everything that needs to arrange windows (diff)
parentMerge pull request #2124 from emersion/drag-icons (diff)
downloadsway-9e96cfd310c4e5dc60f07d772e60b139ff7dc448.tar.gz
sway-9e96cfd310c4e5dc60f07d772e60b139ff7dc448.tar.zst
sway-9e96cfd310c4e5dc60f07d772e60b139ff7dc448.zip
Merge remote-tracking branch 'upstream/master' into atomic
Diffstat (limited to 'include')
-rw-r--r--include/sway/input/seat.h20
-rw-r--r--include/sway/tree/arrange.h6
-rw-r--r--include/sway/tree/container.h12
-rw-r--r--include/sway/tree/layout.h1
4 files changed, 39 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
diff --git a/include/sway/tree/arrange.h b/include/sway/tree/arrange.h
index 897a9392..6c8c0dba 100644
--- a/include/sway/tree/arrange.h
+++ b/include/sway/tree/arrange.h
@@ -4,6 +4,12 @@
4 4
5struct sway_container; 5struct sway_container;
6 6
7// Remove gaps around container
8void remove_gaps(struct sway_container *c);
9
10// Add gaps around container
11void add_gaps(struct sway_container *c);
12
7/** 13/**
8 * Arrange layout for all the children of the given container, and add them to 14 * Arrange layout for all the children of the given container, and add them to
9 * the given transaction. 15 * the given transaction.
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index a8efd893..f4e978ea 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -60,6 +60,11 @@ struct sway_container_state {
60 double swayc_x, swayc_y; 60 double swayc_x, swayc_y;
61 double swayc_width, swayc_height; 61 double swayc_width, swayc_height;
62 62
63 bool has_gaps;
64 double current_gaps;
65 double gaps_inner;
66 double gaps_outer;
67
63 //struct sway_container *parent; 68 //struct sway_container *parent;
64 //list_t *children; 69 //list_t *children;
65 70
@@ -112,6 +117,13 @@ struct sway_container {
112 double saved_x, saved_y; 117 double saved_x, saved_y;
113 double saved_width, saved_height; 118 double saved_width, saved_height;
114 119
120 // The gaps currently applied to the container.
121 double current_gaps;
122
123 bool has_gaps;
124 double gaps_inner;
125 double gaps_outer;
126
115 list_t *children; 127 list_t *children;
116 128
117 struct sway_container *parent; 129 struct sway_container *parent;
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h
index cd131056..ba265623 100644
--- a/include/sway/tree/layout.h
+++ b/include/sway/tree/layout.h
@@ -28,6 +28,7 @@ struct sway_root {
28 struct wl_listener output_layout_change; 28 struct wl_listener output_layout_change;
29 29
30 struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link 30 struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link
31 struct wl_list drag_icons; // sway_drag_icon::link
31 32
32 struct wlr_texture *debug_tree; 33 struct wlr_texture *debug_tree;
33 34