diff options
author | Alex Maese <memaese@hotmail.com> | 2022-06-09 18:27:24 -0500 |
---|---|---|
committer | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-09-19 07:26:45 -0400 |
commit | c015db4a9f115bfa10bd0b4c3fa05aca51b04c9b (patch) | |
tree | 0581ccd8c3639a20df1397b8c7e2dab6881a3289 /include/sway/output.h | |
parent | Fix crash in xdg_activation_v1.c (diff) | |
download | sway-c015db4a9f115bfa10bd0b4c3fa05aca51b04c9b.tar.gz sway-c015db4a9f115bfa10bd0b4c3fa05aca51b04c9b.tar.zst sway-c015db4a9f115bfa10bd0b4c3fa05aca51b04c9b.zip |
sway: Add non-desktop-output type
Currently, when encountering a non-desktop display, sway offers the
output for leasing and returns without storing it in a sway specific
output type like `struct sway_output`. Additionally, running
`swaymsg -t get_outputs` doesn't show non-desktop outputs.
This commit stores the non-desktop outputs into a struct called
`sway_output_non_desktop`, and adds them to a list on `sway_root`
Diffstat (limited to 'include/sway/output.h')
-rw-r--r-- | include/sway/output.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sway/output.h b/include/sway/output.h index 6d8319bf..d72bf1b2 100644 --- a/include/sway/output.h +++ b/include/sway/output.h | |||
@@ -57,6 +57,12 @@ struct sway_output { | |||
57 | struct wl_event_source *repaint_timer; | 57 | struct wl_event_source *repaint_timer; |
58 | }; | 58 | }; |
59 | 59 | ||
60 | struct sway_output_non_desktop { | ||
61 | struct wlr_output *wlr_output; | ||
62 | |||
63 | struct wl_listener destroy; | ||
64 | }; | ||
65 | |||
60 | struct sway_output *output_create(struct wlr_output *wlr_output); | 66 | struct sway_output *output_create(struct wlr_output *wlr_output); |
61 | 67 | ||
62 | void output_destroy(struct sway_output *output); | 68 | void output_destroy(struct sway_output *output); |
@@ -177,4 +183,6 @@ void handle_output_manager_test(struct wl_listener *listener, void *data); | |||
177 | void handle_output_power_manager_set_mode(struct wl_listener *listener, | 183 | void handle_output_power_manager_set_mode(struct wl_listener *listener, |
178 | void *data); | 184 | void *data); |
179 | 185 | ||
186 | struct sway_output_non_desktop *output_non_desktop_create(struct wlr_output *wlr_output); | ||
187 | |||
180 | #endif | 188 | #endif |