summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--applets/fish/fish.c12
-rw-r--r--mate-panel/libegg/eggdesktopfile.c5
-rw-r--r--mate-panel/libpanel-util/panel-launch.c18
-rw-r--r--mate-panel/panel-run-dialog.c9
4 files changed, 25 insertions, 19 deletions
diff --git a/applets/fish/fish.c b/applets/fish/fish.c
index dd06b9a4..37fbb13d 100644
--- a/applets/fish/fish.c
+++ b/applets/fish/fish.c
@@ -813,8 +813,9 @@ static void display_fortune_dialog(FishApplet* fish)
const char *charset;
int argc;
char **argv;
- GdkScreen *screen;
- char *display;
+ GdkDisplay *display;
+ GdkScreen *screen;
+ char *display_name;
/* if there is still a pipe, close it */
if (fish->source_id)
@@ -938,19 +939,20 @@ static void display_fortune_dialog(FishApplet* fish)
clear_fortune_text (fish);
screen = gtk_widget_get_screen (GTK_WIDGET (fish));
- display = gdk_screen_make_display_name (screen);
+ display = gdk_screen_get_display (screen);
+ display_name = g_strdup (gdk_display_get_name (display));
g_spawn_async_with_pipes (NULL, /* working directory */
argv,
NULL, /* envp */
G_SPAWN_SEARCH_PATH|G_SPAWN_STDERR_TO_DEV_NULL,
set_environment,
- &display,
+ &display_name,
NULL, /* child pid */
NULL, /* stdin */
&output,
NULL, /* stderr */
&error);
- g_free (display);
+ g_free (display_name);
if (error) {
char *message;
diff --git a/mate-panel/libegg/eggdesktopfile.c b/mate-panel/libegg/eggdesktopfile.c
index f7c231a8..84e611f7 100644
--- a/mate-panel/libegg/eggdesktopfile.c
+++ b/mate-panel/libegg/eggdesktopfile.c
@@ -1172,13 +1172,12 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file,
if (screen)
{
- char *display_name = gdk_screen_make_display_name (screen);
+ display = gdk_screen_get_display (screen);
+ char *display_name = g_strdup (gdk_display_get_name (display));
char *display_env = g_strdup_printf ("DISPLAY=%s", display_name);
env = array_putenv (env, display_env);
g_free (display_name);
g_free (display_env);
-
- display = gdk_screen_get_display (screen);
}
else
{
diff --git a/mate-panel/libpanel-util/panel-launch.c b/mate-panel/libpanel-util/panel-launch.c
index 0f4d7033..ab330888 100644
--- a/mate-panel/libpanel-util/panel-launch.c
+++ b/mate-panel/libpanel-util/panel-launch.c
@@ -236,11 +236,12 @@ panel_launch_desktop_file_with_fallback (const char *desktop_file,
GdkScreen *screen,
GError **error)
{
- char *argv[2] = { (char *) fallback_exec, NULL };
- GError *local_error;
- gboolean retval;
- GPid pid;
- char *display;
+ char *argv[2] = { (char *) fallback_exec, NULL };
+ GError *local_error;
+ gboolean retval;
+ GPid pid;
+ GdkDisplay *display;
+ char *display_name;
g_return_val_if_fail (desktop_file != NULL, FALSE);
g_return_val_if_fail (fallback_exec != NULL, FALSE);
@@ -257,16 +258,17 @@ panel_launch_desktop_file_with_fallback (const char *desktop_file,
local_error = NULL;
}
- display = gdk_screen_make_display_name (screen);
+ display = gdk_screen_get_display (screen);
+ display_name = g_strdup (gdk_display_get_name (display));
retval = g_spawn_async (NULL, /* working directory */
argv,
NULL, /* envp */
G_SPAWN_SEARCH_PATH,
set_environment,
- &display,
+ &display_name,
&pid,
&local_error);
- g_free (display);
+ g_free (display_name);
if (local_error == NULL && retval == TRUE) {
g_child_watch_add (pid, dummy_child_watch, NULL);
diff --git a/mate-panel/panel-run-dialog.c b/mate-panel/panel-run-dialog.c
index 500fcb62..e8962494 100644
--- a/mate-panel/panel-run-dialog.c
+++ b/mate-panel/panel-run-dialog.c
@@ -384,12 +384,13 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog,
const char *command,
const char *locale_command)
{
+ GdkDisplay *display;
GdkScreen *screen;
gboolean result;
GError *error = NULL;
char **argv;
int argc;
- char *display;
+ char *display_name;
GPid pid;
if (!command_is_executable (locale_command, &argc, &argv))
@@ -400,14 +401,15 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog,
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->terminal_checkbox)))
mate_desktop_prepend_terminal_to_vector (&argc, &argv);
- display = gdk_screen_make_display_name (screen);
+ display = gdk_screen_get_display (screen);
+ display_name = g_strdup (gdk_display_get_name (display));
result = g_spawn_async (NULL, /* working directory */
argv,
NULL, /* envp */
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
set_environment,
- display,
+ display_name,
&pid,
&error);
@@ -427,6 +429,7 @@ panel_run_dialog_launch_command (PanelRunDialog *dialog,
}
g_strfreev (argv);
+ g_free (display_name);
return result;
}