diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2019-01-17 20:16:23 +1000 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2019-01-17 20:16:23 +1000 |
| commit | 0b890bae0ea564218685ddfc20783d3709e9d176 (patch) | |
| tree | 1726c2f8ec1cd9baaf27fbed62aa6a337bc85ce7 /include | |
| parent | 41e06bbc4cbb53b5ff8c6fbce007c8d19af68b57 (diff) | |
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 { const char *socket; struct wlr_backend *backend; + struct wlr_backend *noop_backend; struct wlr_compositor *compositor; 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 { list_t *outputs; // struct sway_output list_t *scratchpad; // struct sway_container - list_t *saved_workspaces; // For when there's no connected outputs + + // For when there's no connected outputs + struct sway_output *noop_output; struct { struct wl_signal new_node; |
