diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config.h | 8 | ||||
-rw-r--r-- | include/util.h | 8 | ||||
-rw-r--r-- | include/workspace.h | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index d591daf2..35797ac2 100644 --- a/include/config.h +++ b/include/config.h | |||
@@ -92,6 +92,13 @@ struct workspace_output { | |||
92 | char *workspace; | 92 | char *workspace; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | struct pid_workspace { | ||
96 | pid_t *pid; | ||
97 | char *workspace; | ||
98 | }; | ||
99 | |||
100 | void free_pid_workspace(struct pid_workspace *pw); | ||
101 | |||
95 | struct bar_config { | 102 | struct bar_config { |
96 | /** | 103 | /** |
97 | * One of "dock", "hide", "invisible" | 104 | * One of "dock", "hide", "invisible" |
@@ -175,6 +182,7 @@ struct sway_config { | |||
175 | list_t *bars; | 182 | list_t *bars; |
176 | list_t *cmd_queue; | 183 | list_t *cmd_queue; |
177 | list_t *workspace_outputs; | 184 | list_t *workspace_outputs; |
185 | list_t *pid_workspaces; | ||
178 | list_t *output_configs; | 186 | list_t *output_configs; |
179 | list_t *input_configs; | 187 | list_t *input_configs; |
180 | list_t *criteria; | 188 | list_t *criteria; |
diff --git a/include/util.h b/include/util.h index dc47e343..6f21bff0 100644 --- a/include/util.h +++ b/include/util.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _SWAY_UTIL_H | 2 | #define _SWAY_UTIL_H |
3 | 3 | ||
4 | #include <stdint.h> | 4 | #include <stdint.h> |
5 | #include <unistd.h> | ||
5 | #include <wlc/wlc.h> | 6 | #include <wlc/wlc.h> |
6 | #include <xkbcommon/xkbcommon.h> | 7 | #include <xkbcommon/xkbcommon.h> |
7 | 8 | ||
@@ -36,4 +37,11 @@ const char *get_modifier_name_by_mask(uint32_t modifier); | |||
36 | */ | 37 | */ |
37 | int get_modifier_names(const char **names, uint32_t modifier_masks); | 38 | int get_modifier_names(const char **names, uint32_t modifier_masks); |
38 | 39 | ||
40 | /** | ||
41 | * Get the pid of a parent process given the pid of a child process. | ||
42 | * | ||
43 | * Returns the parent pid or NULL if the parent pid cannot be determined. | ||
44 | */ | ||
45 | pid_t get_parent_pid(pid_t pid); | ||
46 | |||
39 | #endif | 47 | #endif |
diff --git a/include/workspace.h b/include/workspace.h index 6911e3d4..c268fafa 100644 --- a/include/workspace.h +++ b/include/workspace.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _SWAY_WORKSPACE_H | 2 | #define _SWAY_WORKSPACE_H |
3 | 3 | ||
4 | #include <wlc/wlc.h> | 4 | #include <wlc/wlc.h> |
5 | #include <unistd.h> | ||
5 | #include "list.h" | 6 | #include "list.h" |
6 | #include "layout.h" | 7 | #include "layout.h" |
7 | 8 | ||
@@ -16,5 +17,6 @@ swayc_t *workspace_output_next(); | |||
16 | swayc_t *workspace_next(); | 17 | swayc_t *workspace_next(); |
17 | swayc_t *workspace_output_prev(); | 18 | swayc_t *workspace_output_prev(); |
18 | swayc_t *workspace_prev(); | 19 | swayc_t *workspace_prev(); |
20 | swayc_t *workspace_for_pid(pid_t pid); | ||
19 | 21 | ||
20 | #endif | 22 | #endif |