summaryrefslogtreecommitdiff
path: root/sway/tree/output.c
diff options
context:
space:
mode:
authorWilliam McKinnon <[email protected]>2022-04-26 21:44:51 -0400
committerGitHub <[email protected]>2022-04-26 21:44:51 -0400
commit4660771f6a25b93062df0698634059f893ae1999 (patch)
treeb7135d20119a42d8381fb65004f476750d6212fd /sway/tree/output.c
parentccda4dae0f9b77b9760d6fdf178e0f0e2571cde0 (diff)
parent5543acff06981639086bc9a0fc9b608796a23e84 (diff)
Merge pull request #1 from swaywm/v1.7
V1.7
Diffstat (limited to 'sway/tree/output.c')
-rw-r--r--sway/tree/output.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sway/tree/output.c b/sway/tree/output.c
index c095dce0..ad8d2482 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -56,8 +56,8 @@ static void restore_workspaces(struct sway_output *output) {
}
// Saved workspaces
- while (root->noop_output->workspaces->length) {
- struct sway_workspace *ws = root->noop_output->workspaces->items[0];
+ while (root->fallback_output->workspaces->length) {
+ struct sway_workspace *ws = root->fallback_output->workspaces->items[0];
workspace_detach(ws);
output_add_workspace(output, ws);
@@ -95,7 +95,7 @@ struct sway_output *output_create(struct wlr_output *wlr_output) {
output->detected_subpixel = wlr_output->subpixel;
output->scale_filter = SCALE_FILTER_NEAREST;
- wl_signal_init(&output->events.destroy);
+ wl_signal_init(&output->events.disable);
wl_list_insert(&root->all_outputs, &output->link);
@@ -192,7 +192,7 @@ static void output_evacuate(struct sway_output *output) {
new_output = fallback_output;
}
if (!new_output) {
- new_output = root->noop_output;
+ new_output = root->fallback_output;
}
struct sway_workspace *new_output_ws =
@@ -262,7 +262,7 @@ void output_disable(struct sway_output *output) {
}
sway_log(SWAY_DEBUG, "Disabling output '%s'", output->wlr_output->name);
- wl_signal_emit(&output->events.destroy, output);
+ wl_signal_emit(&output->events.disable, output);
output_evacuate(output);
@@ -286,13 +286,10 @@ void output_begin_destroy(struct sway_output *output) {
return;
}
sway_log(SWAY_DEBUG, "Destroying output '%s'", output->wlr_output->name);
+ wl_signal_emit(&output->node.events.destroy, &output->node);
output->node.destroying = true;
node_set_dirty(&output->node);
-
- wl_list_remove(&output->link);
- output->wlr_output->data = NULL;
- output->wlr_output = NULL;
}
struct sway_output *output_from_wlr_output(struct wlr_output *output) {