Skip to content

Commit

Permalink
notification: Compile with xdg-desktop-portal >= 1.19.1
Browse files Browse the repository at this point in the history
Otherwise the build fails
  • Loading branch information
GeorgesStavracas authored and smcv committed Jan 9, 2025
1 parent 9b139f5 commit fe253f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ config_h.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), mes
xdp_dep = dependency('xdg-desktop-portal', version: '>=1.14.0')
desktop_portal_interfaces_dir = xdp_dep.get_variable(pkgconfig: 'interfaces_dir')

if xdp_dep.version().version_compare('>= 1.19.1')
config_h.set('HAVE_XDP_1_19_1', 1)
endif

portal_deps = [
xdp_dep,
dependency('glib-2.0', version: '>=2.44'),
Expand Down
4 changes: 4 additions & 0 deletions src/notification.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ handle_add_notification (XdpImplNotification *object,

fdo_add_notification (connection, arg_app_id, arg_id, arg_notification, activate_action, NULL);

#ifdef HAVE_XDP_1_19_1
xdp_impl_notification_complete_add_notification (object, invocation, NULL);
#else
xdp_impl_notification_complete_add_notification (object, invocation);
#endif

return TRUE;
}
Expand Down

0 comments on commit fe253f0

Please sign in to comment.