diff options
author | Stefano Karapetsas <[email protected]> | 2013-11-12 16:50:44 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-11-12 16:50:44 +0100 |
commit | d5027c1631b5db4197f9d3a6aa518ce0265ac05f (patch) | |
tree | cf5bcdc0b965a1a1f803bbd704300ef51255cb8f /src/gs-job.c | |
parent | fa5f117527e6674168ef613b5e50190fa08d9e26 (diff) | |
download | mate-screensaver-d5027c1631b5db4197f9d3a6aa518ce0265ac05f.tar.bz2 mate-screensaver-d5027c1631b5db4197f9d3a6aa518ce0265ac05f.tar.xz |
Add GTK3 support
Diffstat (limited to 'src/gs-job.c')
-rw-r--r-- | src/gs-job.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gs-job.c b/src/gs-job.c index 0a90ba8..af77442 100644 --- a/src/gs-job.c +++ b/src/gs-job.c @@ -80,7 +80,11 @@ widget_get_id_string (GtkWidget *widget) g_return_val_if_fail (widget != NULL, NULL); id = g_strdup_printf ("0x%X", +#if GTK_CHECK_VERSION (3, 0, 0) + (guint32)GDK_WINDOW_XID (gtk_widget_get_window (widget))); +#else (guint32)GDK_WINDOW_XID (widget->window)); +#endif return id; } @@ -339,6 +343,19 @@ spawn_on_widget (GtkWidget *widget, env = get_env_vars (widget); error = NULL; +#if GTK_CHECK_VERSION (3, 0, 0) + result = g_spawn_async_with_pipes (NULL, + argv, + (char **)env->pdata, + G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, + NULL, + NULL, + &child_pid, + NULL, + NULL, + &standard_error, + &error); +#else result = gdk_spawn_on_screen_with_pipes (gtk_widget_get_screen (widget), NULL, argv, @@ -351,6 +368,7 @@ spawn_on_widget (GtkWidget *widget, NULL, &standard_error, &error); +#endif for (i = 0; i < env->len; i++) { g_free (g_ptr_array_index (env, i)); |