diff --git a/config.h.meson b/config.h.meson index bc1d778f2c..56b215b012 100644 --- a/config.h.meson +++ b/config.h.meson @@ -284,3 +284,6 @@ #mesondefine HAVE_TRACKER3 #mesondefine HAVE_F16C + +/* Does the OS support GDesktopAppInfo? */ +#mesondefine HAVE_DESKTOPAPPINFO diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c index 43c190e5e6..b2cd99019b 100644 --- a/gdk/x11/gdkapplaunchcontext-x11.c +++ b/gdk/x11/gdkapplaunchcontext-x11.c @@ -27,7 +27,9 @@ #include "gdkdisplay-x11.h" #include +#ifdef HAVE_DESKTOPAPPINFO #include +#endif #include #include @@ -349,10 +351,11 @@ gdk_x11_app_launch_context_get_startup_notify_id (GAppLaunchContext *context, workspace_str = g_strdup_printf ("%d", ctx->workspace); else workspace_str = NULL; - +#ifdef HAVE_DESKTOPAPPINFO if (G_IS_DESKTOP_APP_INFO (info)) application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info)); else +#endif application_id = NULL; startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu", diff --git a/gtk/meson.build b/gtk/meson.build index ed6c97617b..2bb41b03e7 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -814,7 +814,6 @@ endif if macos_enabled gtk_sources += files([ 'gtksearchenginequartz.c', - 'gtkmountoperation-stub.c', 'gtkapplication-quartz.c', 'gtkapplication-quartz-menu.c', 'gtkfilechoosernativequartz.c', @@ -825,7 +824,7 @@ if macos_enabled gtk_cargs += ['-xobjective-c'] # FIXME? maybe add_languages() instead? endif -if not (x11_enabled or win32_enabled or macos_enabled) +if not (x11_enabled or win32_enabled) gtk_sources += ['gtkmountoperation-stub.c', ] endif diff --git a/meson.build b/meson.build index b0314179a8..7534e7f8d9 100644 --- a/meson.build +++ b/meson.build @@ -177,6 +177,7 @@ check_headers = [ 'sys/time.h', 'sys/types.h', 'unistd.h', + 'gio/gdesktopappinfo.h' ] foreach h : check_headers diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build index 42151a5ad3..bf812be140 100644 --- a/testsuite/gtk/meson.build +++ b/testsuite/gtk/meson.build @@ -222,7 +222,7 @@ endforeach if add_languages('cpp', required: false, native: false) test_exe = executable('autotestkeywords', sources: 'autotestkeywords.cc', - c_args: test_cargs + ['-Idummy-headers'], + cpp_args: test_cargs, dependencies: libgtk_dep, install: get_option('install-tests'), install_dir: testexecdir,