From e8abdd43368d824e133e97271c5b89fbdfbd2c4f Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 2 Oct 2024 12:06:58 +0200 Subject: brightness: Don't error-out on communication failure No need to exit the whole MPM process when the module doesn't work. --- src/gpm-brightness.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gpm-brightness.c') diff --git a/src/gpm-brightness.c b/src/gpm-brightness.c index a3a0589..b1600bd 100644 --- a/src/gpm-brightness.c +++ b/src/gpm-brightness.c @@ -131,7 +131,7 @@ gpm_brightness_helper_get_value (const gchar *argument) ret = g_spawn_command_line_sync (command, &stdout_data, NULL, &exit_status, &error); if (!ret) { - g_error ("failed to get value: %s", error->message); + g_warning ("failed to get value: %s", error->message); g_error_free (error); goto out; } @@ -162,7 +162,7 @@ gpm_brightness_helper_set_value (const gchar *argument, gint value) command = g_strdup_printf ("pkexec " SBINDIR "/mate-power-backlight-helper --%s %i", argument, value); ret = g_spawn_command_line_sync (command, NULL, NULL, &exit_status, &error); if (!ret) { - g_error ("failed to get value: %s", error->message); + g_warning ("failed to get value: %s", error->message); g_error_free (error); goto out; } @@ -261,7 +261,7 @@ gpm_brightness_setup_display (GpmBrightness *brightness) /* get the display */ brightness->priv->dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default()); if (!brightness->priv->dpy) { - g_error ("Cannot open display"); + g_critical ("Cannot open display"); return FALSE; } /* is XRandR new enough? */ -- cgit v1.2.1