diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-09-21 20:05:39 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-21 20:05:39 +1000 |
commit | 0798fadff2f2f74a7efd7c14c55737bac19de954 (patch) | |
tree | 86e1ab4983fec3586a8bbb0044216216e22cc1cb /include | |
parent | Fix segfault in output_render (diff) | |
parent | Merge pull request #2671 from emersion/output-execute-no-focus (diff) | |
download | sway-0798fadff2f2f74a7efd7c14c55737bac19de954.tar.gz sway-0798fadff2f2f74a7efd7c14c55737bac19de954.tar.zst sway-0798fadff2f2f74a7efd7c14c55737bac19de954.zip |
Merge branch 'master' into render-output-segfault
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/commands.h | 1 | ||||
-rw-r--r-- | include/sway/tree/view.h | 2 | ||||
-rw-r--r-- | include/swaybar/event_loop.h | 4 | ||||
-rw-r--r-- | include/swaybar/status_line.h | 32 |
4 files changed, 13 insertions, 26 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h index e51b12fd..226cf932 100644 --- a/include/sway/commands.h +++ b/include/sway/commands.h | |||
@@ -103,6 +103,7 @@ sway_cmd cmd_client_urgent; | |||
103 | sway_cmd cmd_client_placeholder; | 103 | sway_cmd cmd_client_placeholder; |
104 | sway_cmd cmd_client_background; | 104 | sway_cmd cmd_client_background; |
105 | sway_cmd cmd_commands; | 105 | sway_cmd cmd_commands; |
106 | sway_cmd cmd_create_output; | ||
106 | sway_cmd cmd_debuglog; | 107 | sway_cmd cmd_debuglog; |
107 | sway_cmd cmd_default_border; | 108 | sway_cmd cmd_default_border; |
108 | sway_cmd cmd_default_floating_border; | 109 | sway_cmd cmd_default_floating_border; |
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 439dc1bf..d10251dd 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -61,6 +61,8 @@ struct sway_view { | |||
61 | struct sway_container *container; // NULL if unmapped and transactions finished | 61 | struct sway_container *container; // NULL if unmapped and transactions finished |
62 | struct wlr_surface *surface; // NULL for unmapped views | 62 | struct wlr_surface *surface; // NULL for unmapped views |
63 | 63 | ||
64 | pid_t pid; | ||
65 | |||
64 | // Geometry of the view itself (excludes borders) in layout coordinates | 66 | // Geometry of the view itself (excludes borders) in layout coordinates |
65 | double x, y; | 67 | double x, y; |
66 | int width, height; | 68 | int width, height; |
diff --git a/include/swaybar/event_loop.h b/include/swaybar/event_loop.h index 99f6ed36..47be5b79 100644 --- a/include/swaybar/event_loop.h +++ b/include/swaybar/event_loop.h | |||
@@ -19,8 +19,8 @@ bool remove_event(int fd); | |||
19 | bool remove_timer(timer_t timer); | 19 | bool remove_timer(timer_t timer); |
20 | 20 | ||
21 | // Blocks and returns after sending callbacks | 21 | // Blocks and returns after sending callbacks |
22 | void event_loop_poll(); | 22 | void event_loop_poll(void); |
23 | 23 | ||
24 | void init_event_loop(); | 24 | void init_event_loop(void); |
25 | 25 | ||
26 | #endif | 26 | #endif |
diff --git a/include/swaybar/status_line.h b/include/swaybar/status_line.h index 150267cd..d3eabdf6 100644 --- a/include/swaybar/status_line.h +++ b/include/swaybar/status_line.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _SWAYBAR_STATUS_LINE_H | 1 | #ifndef _SWAYBAR_STATUS_LINE_H |
2 | #define _SWAYBAR_STATUS_LINE_H | 2 | #define _SWAYBAR_STATUS_LINE_H |
3 | #include <json-c/json.h> | ||
3 | #include <stdint.h> | 4 | #include <stdint.h> |
4 | #include <stdio.h> | 5 | #include <stdio.h> |
5 | #include <stdbool.h> | 6 | #include <stdbool.h> |
@@ -12,28 +13,6 @@ enum status_protocol { | |||
12 | PROTOCOL_I3BAR, | 13 | PROTOCOL_I3BAR, |
13 | }; | 14 | }; |
14 | 15 | ||
15 | struct text_protocol_state { | ||
16 | char *buffer; | ||
17 | size_t buffer_size; | ||
18 | }; | ||
19 | |||
20 | enum json_node_type { | ||
21 | JSON_NODE_UNKNOWN, | ||
22 | JSON_NODE_ARRAY, | ||
23 | JSON_NODE_STRING, | ||
24 | }; | ||
25 | |||
26 | struct i3bar_protocol_state { | ||
27 | bool click_events; | ||
28 | char *buffer; | ||
29 | size_t buffer_size; | ||
30 | size_t buffer_index; | ||
31 | const char *current_node; | ||
32 | bool escape; | ||
33 | size_t depth; | ||
34 | enum json_node_type nodes[16]; | ||
35 | }; | ||
36 | |||
37 | struct i3bar_block { | 16 | struct i3bar_block { |
38 | struct wl_list link; | 17 | struct wl_list link; |
39 | int ref_count; | 18 | int ref_count; |
@@ -63,8 +42,13 @@ struct status_line { | |||
63 | const char *text; | 42 | const char *text; |
64 | struct wl_list blocks; // i3bar_block::link | 43 | struct wl_list blocks; // i3bar_block::link |
65 | 44 | ||
66 | struct text_protocol_state text_state; | 45 | bool click_events; |
67 | struct i3bar_protocol_state i3bar_state; | 46 | char *buffer; |
47 | size_t buffer_size; | ||
48 | size_t buffer_index; | ||
49 | bool started; | ||
50 | bool expecting_comma; | ||
51 | json_tokener *tokener; | ||
68 | }; | 52 | }; |
69 | 53 | ||
70 | struct status_line *status_line_init(char *cmd); | 54 | struct status_line *status_line_init(char *cmd); |