diff options
Diffstat (limited to 'include/sway')
-rw-r--r-- | include/sway/commands.h | 4 | ||||
-rw-r--r-- | include/sway/config.h | 24 | ||||
-rw-r--r-- | include/sway/debug.h | 2 | ||||
-rw-r--r-- | include/sway/ipc-json.h | 2 | ||||
-rw-r--r-- | include/sway/tree/container.h | 3 | ||||
-rw-r--r-- | include/sway/tree/view.h | 7 | ||||
-rw-r--r-- | include/sway/tree/workspace.h | 9 |
7 files changed, 31 insertions, 20 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index 1654eb48..64f707f4 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -95,7 +95,7 @@ struct cmd_results *add_color(const char *name, | |||
95 | /** | 95 | /** |
96 | * TODO: Move this function and its dependent functions to container.c. | 96 | * TODO: Move this function and its dependent functions to container.c. |
97 | */ | 97 | */ |
98 | void container_resize_tiled(struct sway_container *parent, enum wlr_edges edge, | 98 | bool container_resize_tiled(struct sway_container *parent, enum wlr_edges edge, |
99 | int amount); | 99 | int amount); |
100 | 100 | ||
101 | sway_cmd cmd_assign; | 101 | sway_cmd cmd_assign; |
@@ -160,6 +160,7 @@ sway_cmd cmd_scratchpad; | |||
160 | sway_cmd cmd_seamless_mouse; | 160 | sway_cmd cmd_seamless_mouse; |
161 | sway_cmd cmd_set; | 161 | sway_cmd cmd_set; |
162 | sway_cmd cmd_show_marks; | 162 | sway_cmd cmd_show_marks; |
163 | sway_cmd cmd_smart_borders; | ||
163 | sway_cmd cmd_smart_gaps; | 164 | sway_cmd cmd_smart_gaps; |
164 | sway_cmd cmd_split; | 165 | sway_cmd cmd_split; |
165 | sway_cmd cmd_splith; | 166 | sway_cmd cmd_splith; |
@@ -217,6 +218,7 @@ sway_cmd bar_colors_cmd_urgent_workspace; | |||
217 | sway_cmd input_cmd_seat; | 218 | sway_cmd input_cmd_seat; |
218 | sway_cmd input_cmd_accel_profile; | 219 | sway_cmd input_cmd_accel_profile; |
219 | sway_cmd input_cmd_click_method; | 220 | sway_cmd input_cmd_click_method; |
221 | sway_cmd input_cmd_drag; | ||
220 | sway_cmd input_cmd_drag_lock; | 222 | sway_cmd input_cmd_drag_lock; |
221 | sway_cmd input_cmd_dwt; | 223 | sway_cmd input_cmd_dwt; |
222 | sway_cmd input_cmd_events; | 224 | sway_cmd input_cmd_events; |
diff --git a/include/sway/config.h b/include/sway/config.h index 35f0e708..98a18b76 100644 --- a/include/sway/config.h +++ b/include/sway/config.h | |||
@@ -93,6 +93,7 @@ struct input_config { | |||
93 | 93 | ||
94 | int accel_profile; | 94 | int accel_profile; |
95 | int click_method; | 95 | int click_method; |
96 | int drag; | ||
96 | int drag_lock; | 97 | int drag_lock; |
97 | int dwt; | 98 | int dwt; |
98 | int left_handed; | 99 | int left_handed; |
@@ -167,13 +168,14 @@ struct output_config { | |||
167 | }; | 168 | }; |
168 | 169 | ||
169 | /** | 170 | /** |
170 | * Maps a workspace name to an output name. | 171 | * Stores configuration for a workspace, regardless of whether the workspace |
171 | * | 172 | * exists. |
172 | * Set via `workspace <x> output <y>` | ||
173 | */ | 173 | */ |
174 | struct workspace_output { | 174 | struct workspace_config { |
175 | char *output; | ||
176 | char *workspace; | 175 | char *workspace; |
176 | char *output; | ||
177 | int gaps_inner; | ||
178 | int gaps_outer; | ||
177 | }; | 179 | }; |
178 | 180 | ||
179 | struct bar_config { | 181 | struct bar_config { |
@@ -251,7 +253,8 @@ enum edge_border_types { | |||
251 | E_VERTICAL, /**< hide vertical edge borders */ | 253 | E_VERTICAL, /**< hide vertical edge borders */ |
252 | E_HORIZONTAL, /**< hide horizontal edge borders */ | 254 | E_HORIZONTAL, /**< hide horizontal edge borders */ |
253 | E_BOTH, /**< hide vertical and horizontal edge borders */ | 255 | E_BOTH, /**< hide vertical and horizontal edge borders */ |
254 | E_SMART /**< hide both if precisely one window is present in workspace */ | 256 | E_SMART, /**< hide both if precisely one window is present in workspace */ |
257 | E_SMART_NO_GAPS, /**< hide both if one window and gaps to edge is zero */ | ||
255 | }; | 258 | }; |
256 | 259 | ||
257 | enum command_context { | 260 | enum command_context { |
@@ -327,7 +330,7 @@ struct sway_config { | |||
327 | list_t *modes; | 330 | list_t *modes; |
328 | list_t *bars; | 331 | list_t *bars; |
329 | list_t *cmd_queue; | 332 | list_t *cmd_queue; |
330 | list_t *workspace_outputs; | 333 | list_t *workspace_configs; |
331 | list_t *output_configs; | 334 | list_t *output_configs; |
332 | list_t *input_configs; | 335 | list_t *input_configs; |
333 | list_t *seat_configs; | 336 | list_t *seat_configs; |
@@ -381,6 +384,7 @@ struct sway_config { | |||
381 | int border_thickness; | 384 | int border_thickness; |
382 | int floating_border_thickness; | 385 | int floating_border_thickness; |
383 | enum edge_border_types hide_edge_borders; | 386 | enum edge_border_types hide_edge_borders; |
387 | enum edge_border_types saved_edge_borders; | ||
384 | 388 | ||
385 | // border colors | 389 | // border colors |
386 | struct { | 390 | struct { |
@@ -450,8 +454,6 @@ void free_sway_variable(struct sway_variable *var); | |||
450 | */ | 454 | */ |
451 | char *do_var_replacement(char *str); | 455 | char *do_var_replacement(char *str); |
452 | 456 | ||
453 | struct cmd_results *check_security_config(); | ||
454 | |||
455 | int input_identifier_cmp(const void *item, const void *data); | 457 | int input_identifier_cmp(const void *item, const void *data); |
456 | 458 | ||
457 | struct input_config *new_input_config(const char* identifier); | 459 | struct input_config *new_input_config(const char* identifier); |
@@ -472,7 +474,7 @@ struct seat_config *copy_seat_config(struct seat_config *seat); | |||
472 | 474 | ||
473 | void free_seat_config(struct seat_config *ic); | 475 | void free_seat_config(struct seat_config *ic); |
474 | 476 | ||
475 | struct seat_attachment_config *seat_attachment_config_new(); | 477 | struct seat_attachment_config *seat_attachment_config_new(void); |
476 | 478 | ||
477 | struct seat_attachment_config *seat_config_get_attachment( | 479 | struct seat_attachment_config *seat_config_get_attachment( |
478 | struct seat_config *seat_config, char *identifier); | 480 | struct seat_config *seat_config, char *identifier); |
@@ -518,6 +520,8 @@ struct bar_config *default_bar_config(void); | |||
518 | 520 | ||
519 | void free_bar_config(struct bar_config *bar); | 521 | void free_bar_config(struct bar_config *bar); |
520 | 522 | ||
523 | void free_workspace_config(struct workspace_config *wsc); | ||
524 | |||
521 | /** | 525 | /** |
522 | * Updates the value of config->font_height based on the max title height | 526 | * Updates the value of config->font_height based on the max title height |
523 | * reported by each container. If recalculate is true, the containers will | 527 | * reported by each container. If recalculate is true, the containers will |
diff --git a/include/sway/debug.h b/include/sway/debug.h index bf3a5f6d..0e9bb056 100644 --- a/include/sway/debug.h +++ b/include/sway/debug.h | |||
@@ -17,6 +17,6 @@ struct sway_debug { | |||
17 | 17 | ||
18 | extern struct sway_debug debug; | 18 | extern struct sway_debug debug; |
19 | 19 | ||
20 | void update_debug_tree(); | 20 | void update_debug_tree(void); |
21 | 21 | ||
22 | #endif | 22 | #endif |
diff --git a/include/sway/ipc-json.h b/include/sway/ipc-json.h index fef243e3..1cbfd15d 100644 --- a/include/sway/ipc-json.h +++ b/include/sway/ipc-json.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include "sway/tree/container.h" | 4 | #include "sway/tree/container.h" |
5 | #include "sway/input/input-manager.h" | 5 | #include "sway/input/input-manager.h" |
6 | 6 | ||
7 | json_object *ipc_json_get_version(); | 7 | json_object *ipc_json_get_version(void); |
8 | 8 | ||
9 | json_object *ipc_json_describe_disabled_output(struct sway_output *o); | 9 | json_object *ipc_json_describe_disabled_output(struct sway_output *o); |
10 | json_object *ipc_json_describe_node(struct sway_node *node); | 10 | json_object *ipc_json_describe_node(struct sway_node *node); |
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 6019602c..da6592b4 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -94,9 +94,6 @@ struct sway_container { | |||
94 | 94 | ||
95 | // The gaps currently applied to the container. | 95 | // The gaps currently applied to the container. |
96 | double current_gaps; | 96 | double current_gaps; |
97 | bool has_gaps; | ||
98 | double gaps_inner; | ||
99 | double gaps_outer; | ||
100 | 97 | ||
101 | struct sway_workspace *workspace; // NULL when hidden in the scratchpad | 98 | struct sway_workspace *workspace; // NULL when hidden in the scratchpad |
102 | struct sway_container *parent; // NULL if container in root of workspace | 99 | struct sway_container *parent; // NULL if container in root of workspace |
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 2c7b4c2b..028be536 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -265,6 +265,13 @@ uint32_t view_configure(struct sway_view *view, double lx, double ly, int width, | |||
265 | int height); | 265 | int height); |
266 | 266 | ||
267 | /** | 267 | /** |
268 | * Whether or not the view is the only visible view in its tree. If the view | ||
269 | * is tiling, there may be floating views. If the view is floating, there may | ||
270 | * be tiling views or views in a different floating container. | ||
271 | */ | ||
272 | bool view_is_only_visible(struct sway_view *view); | ||
273 | |||
274 | /** | ||
268 | * Configure the view's position and size based on the container's position and | 275 | * Configure the view's position and size based on the container's position and |
269 | * size, taking borders into consideration. | 276 | * size, taking borders into consideration. |
270 | */ | 277 | */ |
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h index e4b616d1..efdae5a1 100644 --- a/include/sway/tree/workspace.h +++ b/include/sway/tree/workspace.h | |||
@@ -32,10 +32,9 @@ struct sway_workspace { | |||
32 | enum sway_container_layout layout; | 32 | enum sway_container_layout layout; |
33 | enum sway_container_layout prev_split_layout; | 33 | enum sway_container_layout prev_split_layout; |
34 | 34 | ||
35 | double current_gaps; | 35 | int current_gaps; |
36 | bool has_gaps; | 36 | int gaps_inner; |
37 | double gaps_inner; | 37 | int gaps_outer; |
38 | double gaps_outer; | ||
39 | 38 | ||
40 | struct sway_output *output; // NULL if no outputs are connected | 39 | struct sway_output *output; // NULL if no outputs are connected |
41 | list_t *floating; // struct sway_container | 40 | list_t *floating; // struct sway_container |
@@ -48,6 +47,8 @@ struct sway_workspace { | |||
48 | 47 | ||
49 | extern char *prev_workspace_name; | 48 | extern char *prev_workspace_name; |
50 | 49 | ||
50 | struct workspace_config *workspace_find_config(const char *ws_name); | ||
51 | |||
51 | struct sway_output *workspace_get_initial_output(const char *name); | 52 | struct sway_output *workspace_get_initial_output(const char *name); |
52 | 53 | ||
53 | struct sway_workspace *workspace_create(struct sway_output *output, | 54 | struct sway_workspace *workspace_create(struct sway_output *output, |