]> git.mdlowis.com Git - proto/labwc.git/commitdiff
output: ensure we don't run into an assert() on VT switch
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 8 Apr 2024 14:29:20 +0000 (16:29 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Mon, 8 Apr 2024 20:14:47 +0000 (21:14 +0100)
Also reduce log spam from failed output commits that
can happen for various reasons outside of our control.

Fixes: #1667
src/common/scene-helpers.c
src/output.c

index b8a7ac476edddde098eb30b8e03556e21388744c..6c7ed9ea364dbb2e29e30292891797d7546bb828 100644 (file)
@@ -55,7 +55,7 @@ lab_wlr_scene_output_commit(struct wlr_scene_output *scene_output)
                return false;
        }
        if (!wlr_output_commit(wlr_output)) {
-               wlr_log(WLR_ERROR, "Failed to commit output %s",
+               wlr_log(WLR_INFO, "Failed to commit output %s",
                        wlr_output->name);
                return false;
        }
index e81abaee46cd50884fb7207da9e0b5823d572967..67d8de7764667e71abaaa5cdb76259afd496f4a6 100644 (file)
@@ -60,6 +60,17 @@ output_frame_notify(struct wl_listener *listener, void *data)
                return;
        }
 
+       if (!output->scene_output) {
+               /*
+                * TODO: This is a short term fix for issue #1667,
+                *       a proper fix would require restructuring
+                *       the life cycle of scene outputs, e.g.
+                *       creating them on new_output_notify() only.
+                */
+               wlr_log(WLR_INFO, "Failed to render new frame: no scene-output");
+               return;
+       }
+
        struct wlr_output *wlr_output = output->wlr_output;
        struct server *server = output->server;