mirror of
https://github.com/swaywm/sway.git
synced 2026-04-03 07:15:39 -04:00
Drop sway_output.events.disable
In general wl_signal isn't well-suited for Sway: Sway doesn't need any modularity, and signals make it trickier to track down exactly what happens down the stack. Replace Sway's output disable signal with a simple list tracking for the only user.
This commit is contained in:
parent
56f2db062d
commit
a1ac2a2e93
4 changed files with 17 additions and 20 deletions
|
|
@ -136,12 +136,11 @@ 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.disable);
|
||||
|
||||
wl_list_insert(&root->all_outputs, &output->link);
|
||||
|
||||
output->workspaces = create_list();
|
||||
output->current.workspaces = create_list();
|
||||
wl_list_init(&output->layer_surfaces);
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
@ -284,7 +283,6 @@ void output_disable(struct sway_output *output) {
|
|||
}
|
||||
|
||||
sway_log(SWAY_DEBUG, "Disabling output '%s'", output->wlr_output->name);
|
||||
wl_signal_emit_mutable(&output->events.disable, output);
|
||||
|
||||
// Remove the output now to avoid interacting with it during e.g.,
|
||||
// transactions, as the output might be physically removed with the scene
|
||||
|
|
@ -292,6 +290,7 @@ void output_disable(struct sway_output *output) {
|
|||
list_del(root->outputs, index);
|
||||
output->enabled = false;
|
||||
|
||||
destroy_layers(output);
|
||||
output_evacuate(output);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue