diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2022-12-01 18:37:02 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2022-12-14 13:31:19 +0000 |
commit | 79eac214d4866d840767b6a430c6168e55a214c0 (patch) | |
tree | 83ac59216a7a121c6b07cbccfbc4f2f4c1be97cb | |
parent | 59375972f5642b7ec5115fdecf4828f6af02f343 (diff) |
src: Further hotplug connector fixes
Some further checks for the black curtain not being present always when
perform hot-plugging operations.
Bug-AGL: SPEC-4625
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Detlev Casanova <detlev.casanova@collabora.com>
Change-Id: Ia7c05e5b90b9e8260f661a8115a93b0d246b9d98
-rw-r--r-- | src/compositor.c | 3 | ||||
-rw-r--r-- | src/shell.c | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/compositor.c b/src/compositor.c index 7e89926..1f45a71 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -87,7 +87,8 @@ handle_output_destroy(struct wl_listener *listener, void *data) output = wl_container_of(listener, output, output_destroy); assert(output->output == data); - if (output->fullscreen_view.fs->view) { + if (output->fullscreen_view.fs && + output->fullscreen_view.fs->view) { weston_surface_destroy(output->fullscreen_view.fs->view->surface); output->fullscreen_view.fs->view = NULL; } diff --git a/src/shell.c b/src/shell.c index aaf0468..1418d95 100644 --- a/src/shell.c +++ b/src/shell.c @@ -802,7 +802,8 @@ ivi_shell_finalize(struct ivi_compositor *ivi) weston_layer_fini(&ivi->popup); wl_list_for_each(output, &ivi->outputs, link) { - if (output->fullscreen_view.fs->view) { + if (output->fullscreen_view.fs && + output->fullscreen_view.fs->view) { weston_surface_destroy(output->fullscreen_view.fs->view->surface); output->fullscreen_view.fs->view = NULL; } @@ -1097,9 +1098,10 @@ remove_black_curtain(struct ivi_output *output) { struct weston_view *view; - if (!output && + if ((!output && !output->fullscreen_view.fs && - !output->fullscreen_view.fs->view) { + !output->fullscreen_view.fs->view) || + !output->fullscreen_view.fs) { weston_log("Output %s doesn't have a surface installed!\n", output->name); return; } @@ -1126,7 +1128,8 @@ insert_black_curtain(struct ivi_output *output) if ((!output && !output->fullscreen_view.fs && - !output->fullscreen_view.fs->view) || !output->output) { + !output->fullscreen_view.fs->view) || !output->output || + !output->fullscreen_view.fs) { weston_log("Output %s doesn't have a surface installed!\n", output->name); return; } |