From 5907d9fa42de16f6888142e29eda74bf15d358cc Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 14 Feb 2024 11:09:37 +0000 Subject: [PATCH] Revert "xdg-desktop-portal-gtk: build without support for notifications" This reverts commit c9e02bfd8a9f0824be3d92376bd6ed9426157a32. disable notifications at this level did not cause fractal (gtk app) to send its notifications to swaync. instead, it still tried to deliver to the Portal, where the Portal wasn't expecting anything and just returned an error to fractal. setting `GNOTIFICATION_BACKEND = "freedesktop"` seems to be the correct way to get gtk apps to behave as desired with their notifications. --- hosts/common/programs/default.nix | 1 - hosts/common/programs/xdg-desktop-portal-gtk.nix | 16 ---------------- 2 files changed, 17 deletions(-) delete mode 100644 hosts/common/programs/xdg-desktop-portal-gtk.nix diff --git a/hosts/common/programs/default.nix b/hosts/common/programs/default.nix index 4191dad0a..3a5aed023 100644 --- a/hosts/common/programs/default.nix +++ b/hosts/common/programs/default.nix @@ -93,7 +93,6 @@ ./wob ./xarchiver.nix ./xdg-desktop-portal.nix - ./xdg-desktop-portal-gtk.nix ./xdg-utils.nix ./zeal.nix ./zecwallet-lite.nix diff --git a/hosts/common/programs/xdg-desktop-portal-gtk.nix b/hosts/common/programs/xdg-desktop-portal-gtk.nix deleted file mode 100644 index 3a14c0bed..000000000 --- a/hosts/common/programs/xdg-desktop-portal-gtk.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: -{ - sane.programs.xdg-desktop-portal-gtk = { - packageUnwrapped = pkgs.xdg-desktop-portal-gtk.overrideAttrs (upstream: { - postPatch = (upstream.postPatch or "") + '' - # configure to not advertise the Notification portal. - # this can be patched at source level, or after building, at `$out/share/xdg-desktop-portals/portals/gtk.portal`. - # by removing this, xdg-desktop-portal won't advertise `org.freedesktop.portal.Notification`, - # and so portal-capable applications will prefer the non-portal `org.freedesktop.Notifications`, - # which is what most notification daemons (swaync, mako, ...) speak. - substituteInPlace data/gtk.portal.in \ - --replace-fail 'org.freedesktop.impl.portal.Notification;' "" - ''; - }); - }; -}