Conditional check for gdesktopappinfo header
GDesktopAppInfo is not available on macOS and needs to be disabled
This commit is contained in:
@@ -284,3 +284,6 @@
|
|||||||
#mesondefine HAVE_TRACKER3
|
#mesondefine HAVE_TRACKER3
|
||||||
|
|
||||||
#mesondefine HAVE_F16C
|
#mesondefine HAVE_F16C
|
||||||
|
|
||||||
|
/* Does the OS support GDesktopAppInfo? */
|
||||||
|
#mesondefine HAVE_DESKTOPAPPINFO
|
||||||
|
|||||||
@@ -27,7 +27,9 @@
|
|||||||
#include "gdkdisplay-x11.h"
|
#include "gdkdisplay-x11.h"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
#ifdef HAVE_DESKTOPAPPINFO
|
||||||
#include <gio/gdesktopappinfo.h>
|
#include <gio/gdesktopappinfo.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -349,10 +351,11 @@ gdk_x11_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
|||||||
workspace_str = g_strdup_printf ("%d", ctx->workspace);
|
workspace_str = g_strdup_printf ("%d", ctx->workspace);
|
||||||
else
|
else
|
||||||
workspace_str = NULL;
|
workspace_str = NULL;
|
||||||
|
#ifdef HAVE_DESKTOPAPPINFO
|
||||||
if (G_IS_DESKTOP_APP_INFO (info))
|
if (G_IS_DESKTOP_APP_INFO (info))
|
||||||
application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
|
application_id = g_desktop_app_info_get_filename (G_DESKTOP_APP_INFO (info));
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
application_id = NULL;
|
application_id = NULL;
|
||||||
|
|
||||||
startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
|
startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu",
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ check_headers = [
|
|||||||
'sys/time.h',
|
'sys/time.h',
|
||||||
'sys/types.h',
|
'sys/types.h',
|
||||||
'unistd.h',
|
'unistd.h',
|
||||||
|
'gio/gdesktopappinfo.h'
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach h : check_headers
|
foreach h : check_headers
|
||||||
|
|||||||
Reference in New Issue
Block a user