summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/panel-run-dialog.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c
index 77d2ba38..01c35deb 100644
--- a/mate-panel/panel-run-dialog.c
+++ b/mate-panel/panel-run-dialog.c
@@ -360,17 +360,6 @@ dummy_child_watch (GPid pid,
*/
}
-#if GTK_CHECK_VERSION (3, 0, 0)
-/*
- * Set the DISPLAY variable, to be use by g_spawn_async.
- */
-static void
-set_environment (gpointer display)
-{
- g_setenv ("DISPLAY", display, TRUE);
-}
-#endif
-
static gboolean
panel_run_dialog_launch_command (PanelRunDialog *dialog,
const char *command,
@@ -382,9 +371,6 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog,
char **argv;
int argc;
GPid pid;
-#if GTK_CHECK_VERSION (3, 0, 0)
- char *display;
-#endif
if (!command_is_executable (locale_command, &argc, &argv))
return FALSE;
@@ -395,18 +381,14 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog,
mate_desktop_prepend_terminal_to_vector (&argc, &argv);
#if GTK_CHECK_VERSION (3, 0, 0)
- display = gdk_screen_make_display_name (screen);
-
result = g_spawn_async (NULL, /* working directory */
argv,
NULL, /* envp */
G_SPAWN_SEARCH_PATH,
- set_environment,
- &display,
NULL,
+ NULL,
+ &pid,
&error);
-
- g_free (display);
#else
result = gdk_spawn_on_screen (screen,
NULL, /* working directory */