diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2019-01-17 20:16:23 +1000 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2019-01-22 09:55:13 +0100 |
commit | 2301349ad59751640ed9e59dd22edeafaf09da39 (patch) | |
tree | 1726c2f8ec1cd9baaf27fbed62aa6a337bc85ce7 /include | |
parent | seat_create: set initial focus for added seats (diff) | |
download | sway-2301349ad59751640ed9e59dd22edeafaf09da39.tar.gz sway-2301349ad59751640ed9e59dd22edeafaf09da39.tar.zst sway-2301349ad59751640ed9e59dd22edeafaf09da39.zip |
Use noop output when there's no outputs connected
Instead of having NULL workspace->output pointers, use a noop output.
This should be safer.
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/server.h | 1 | ||||
-rw-r--r-- | include/sway/tree/root.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/sway/server.h b/include/sway/server.h index 0f30653f..9242ceb7 100644 --- a/include/sway/server.h +++ b/include/sway/server.h | |||
@@ -24,6 +24,7 @@ struct sway_server { | |||
24 | const char *socket; | 24 | const char *socket; |
25 | 25 | ||
26 | struct wlr_backend *backend; | 26 | struct wlr_backend *backend; |
27 | struct wlr_backend *noop_backend; | ||
27 | 28 | ||
28 | struct wlr_compositor *compositor; | 29 | struct wlr_compositor *compositor; |
29 | struct wlr_data_device_manager *data_device_manager; | 30 | struct wlr_data_device_manager *data_device_manager; |
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h index ceccc920..8f4deaa7 100644 --- a/include/sway/tree/root.h +++ b/include/sway/tree/root.h | |||
@@ -31,7 +31,9 @@ struct sway_root { | |||
31 | 31 | ||
32 | list_t *outputs; // struct sway_output | 32 | list_t *outputs; // struct sway_output |
33 | list_t *scratchpad; // struct sway_container | 33 | list_t *scratchpad; // struct sway_container |
34 | list_t *saved_workspaces; // For when there's no connected outputs | 34 | |
35 | // For when there's no connected outputs | ||
36 | struct sway_output *noop_output; | ||
35 | 37 | ||
36 | struct { | 38 | struct { |
37 | struct wl_signal new_node; | 39 | struct wl_signal new_node; |