diff options
author | rbuj <[email protected]> | 2021-10-26 13:31:46 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-02-19 01:30:54 +0100 |
commit | 7667d54262f41486eba1d8a6608f48fbfbb0855e (patch) | |
tree | eb30d60a039941fab7504209bf5aa37f32adc1c9 | |
parent | 53a3feeb421a2a3d01ae290d4d830658510eee60 (diff) | |
download | mate-screensaver-7667d54262f41486eba1d8a6608f48fbfbb0855e.tar.bz2 mate-screensaver-7667d54262f41486eba1d8a6608f48fbfbb0855e.tar.xz |
Don't build the path to mate-screensaver-gl-helper
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/gs-window-x11.c | 9 | ||||
-rw-r--r-- | src/mate-screensaver-preferences.c | 9 |
3 files changed, 7 insertions, 12 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 244b653..df8280c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,6 +25,7 @@ AM_CPPFLAGS = \ -DSAVERDIR=\""$(saverdir)"\" \ -DTHEMESDIR=\""$(themesdir)"\" \ -DGTKBUILDERDIR=\"$(pkgdatadir)\" \ + -DMATE_SCREENSAVER_GL_HELPER_PATH=\""$(libexecdir)/mate-screensaver-gl-helper"\" \ -DPAM_SERVICE_NAME=\""mate-screensaver"\" \ $(WARN_CFLAGS) \ $(AUTH_CFLAGS) \ diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c index 218a37e..eba8721 100644 --- a/src/gs-window-x11.c +++ b/src/gs-window-x11.c @@ -506,7 +506,6 @@ static GdkVisual * get_best_visual_for_display (GdkDisplay *display) { GdkScreen *screen; - char *command; char *std_output; int exit_status; GError *error; @@ -518,19 +517,18 @@ get_best_visual_for_display (GdkDisplay *display) visual = NULL; screen = gdk_display_get_default_screen (display); - command = g_build_filename (LIBEXECDIR, "mate-screensaver-gl-helper", NULL); - error = NULL; std_output = NULL; res = spawn_command_line_on_display_sync (display, - command, + MATE_SCREENSAVER_GL_HELPER_PATH, &std_output, NULL, &exit_status, &error); if (! res) { - gs_debug ("Could not run command '%s': %s", command, error->message); + gs_debug ("Could not run command '%s': %s", + MATE_SCREENSAVER_GL_HELPER_PATH, error->message); g_error_free (error); goto out; } @@ -551,7 +549,6 @@ get_best_visual_for_display (GdkDisplay *display) } out: g_free (std_output); - g_free (command); return g_object_ref (visual); } diff --git a/src/mate-screensaver-preferences.c b/src/mate-screensaver-preferences.c index 1a82d6e..5bb0159 100644 --- a/src/mate-screensaver-preferences.c +++ b/src/mate-screensaver-preferences.c @@ -1427,7 +1427,6 @@ static GdkVisual * get_best_visual_for_display (GdkDisplay *display) { GdkScreen *screen; - char *command; char *std_output; int exit_status; GError *error; @@ -1439,19 +1438,18 @@ get_best_visual_for_display (GdkDisplay *display) visual = NULL; screen = gdk_display_get_default_screen (display); - command = g_build_filename (LIBEXECDIR, "mate-screensaver-gl-helper", NULL); - error = NULL; std_output = NULL; res = spawn_command_line_on_display_sync (display, - command, + MATE_SCREENSAVER_GL_HELPER_PATH, &std_output, NULL, &exit_status, &error); if (! res) { - gs_debug ("Could not run command '%s': %s", command, error->message); + gs_debug ("Could not run command '%s': %s", + MATE_SCREENSAVER_GL_HELPER_PATH, error->message); g_error_free (error); goto out; } @@ -1472,7 +1470,6 @@ get_best_visual_for_display (GdkDisplay *display) } out: g_free (std_output); - g_free (command); return visual; } |