mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
output: destroy output after ensuring it is disabled
This became necessary after the removal of the wlr_output_damage object. Before, the wlr_output_damage destroy signal fired disabling the output, then after the handle_destroy function would be called. Fix this to prevent hitting an assert.
This commit is contained in:
parent
625cf6df3b
commit
d1417b8a13
1 changed files with 2 additions and 1 deletions
|
|
@ -286,12 +286,13 @@ static void update_output_manager_config(struct sway_server *server) {
|
||||||
static void handle_destroy(struct wl_listener *listener, void *data) {
|
static void handle_destroy(struct wl_listener *listener, void *data) {
|
||||||
struct sway_output *output = wl_container_of(listener, output, destroy);
|
struct sway_output *output = wl_container_of(listener, output, destroy);
|
||||||
struct sway_server *server = output->server;
|
struct sway_server *server = output->server;
|
||||||
output_begin_destroy(output);
|
|
||||||
|
|
||||||
if (output->enabled) {
|
if (output->enabled) {
|
||||||
output_disable(output);
|
output_disable(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output_begin_destroy(output);
|
||||||
|
|
||||||
wl_list_remove(&output->link);
|
wl_list_remove(&output->link);
|
||||||
|
|
||||||
wl_list_remove(&output->destroy.link);
|
wl_list_remove(&output->destroy.link);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue