mirror of
https://github.com/swaywm/sway.git
synced 2026-04-03 07:15:39 -04:00
output: change output::destroy to output::disable
This changes output::destroy to output::disable and emits it only once when an output is disabled, instead of twice in succession.
This commit is contained in:
parent
f2b6d1ec29
commit
ebfe432ec3
4 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
|
|
@ -289,10 +289,6 @@ void output_begin_destroy(struct sway_output *output) {
|
|||
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue