mirror of
https://github.com/swaywm/sway.git
synced 2026-04-23 06:46:27 -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
|
|
@ -754,18 +754,22 @@ static void update_output_manager_config(struct sway_server *server) {
|
|||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||
struct sway_output *output = wl_container_of(listener, output, destroy);
|
||||
struct sway_server *server = output->server;
|
||||
wl_signal_emit(&output->events.destroy, output);
|
||||
output_begin_destroy(output);
|
||||
|
||||
if (output->enabled) {
|
||||
output_disable(output);
|
||||
}
|
||||
output_begin_destroy(output);
|
||||
|
||||
wl_list_remove(&output->link);
|
||||
|
||||
wl_list_remove(&output->destroy.link);
|
||||
wl_list_remove(&output->commit.link);
|
||||
wl_list_remove(&output->mode.link);
|
||||
wl_list_remove(&output->present.link);
|
||||
|
||||
output->wlr_output->data = NULL;
|
||||
output->wlr_output = NULL;
|
||||
|
||||
transaction_commit_dirty();
|
||||
|
||||
update_output_manager_config(server);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue