From 74bd38938a6dc7ca98c5c1f2171b408d0dad2ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 27 Apr 2024 12:34:41 +0200 Subject: [PATCH 1/3] main: Include locale.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes buildtype=debug which otherwise fails like: ../src/main.c: In function ‘main’: ../src/main.c:158:3: warning: implicit declaration of function ‘setlocale’ [-Wimplicit-function-declaration] 158 | setlocale (LC_MESSAGES, ""); | ^~~~~~~~~ ../src/main.c:158:3: warning: nested extern declaration of ‘setlocale’ [-Wnested-externs] ../src/main.c:158:14: error: ‘LC_MESSAGES’ undeclared (first use in this function) 158 | setlocale (LC_MESSAGES, ""); | ^~~~~~~~~~~ ../src/main.c:158:14: note: each undeclared identifier is reported only once for each function it appears in Part-of: --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index 9663457c7..a182f9409 100644 --- a/src/main.c +++ b/src/main.c @@ -18,6 +18,8 @@ #include #include +#include + #include #include #include -- GitLab From 31ae5c29bcff958e6b20a759bef794a2466f25bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 27 Apr 2024 12:51:44 +0200 Subject: [PATCH 2/3] output: Fix indent Gbp-Dch: Ignore Part-of: --- src/output.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/output.c b/src/output.c index 96331e53c..31cc22c99 100644 --- a/src/output.c +++ b/src/output.c @@ -908,9 +908,9 @@ phoc_output_initable_init (GInitable *initable, if (priv->cutouts) { g_message ("Adding cutouts overlay"); priv->cutouts_texture = phoc_cutouts_overlay_get_cutouts_texture (priv->cutouts, self); - priv->render_cutouts_id = g_signal_connect_swapped (renderer, "render-end", - G_CALLBACK (render_cutouts), - self); + priv->render_cutouts_id = g_signal_connect_swapped (renderer, "render-end", + G_CALLBACK (render_cutouts), + self); } else { g_warning ("Could not create cutout overlay"); } -- GitLab From 3e06ffd57a3546a26be9729f67397f370650fee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 27 Apr 2024 12:52:08 +0200 Subject: [PATCH 3/3] output: Disconnect render_coutputs signal from the correct object Otherwise we might try to access an already gone output in render_cutouts Part-of: --- src/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.c b/src/output.c index 31cc22c99..6daa5aca4 100644 --- a/src/output.c +++ b/src/output.c @@ -944,10 +944,10 @@ phoc_output_finalize (GObject *object) wl_list_init (&self->layer_surfaces); + g_clear_signal_handler (&priv->render_cutouts_id, priv->renderer); g_clear_object (&priv->renderer); g_clear_object (&priv->cutouts); g_clear_pointer (&priv->cutouts_texture, wlr_texture_destroy); - g_clear_signal_handler (&priv->render_cutouts_id, self); g_clear_object (&priv->shield); g_clear_object (&self->desktop); -- GitLab