git: 3dee7e552236 - main - x11-wm/niri: set XDG_SESSION_TYPE by default (a la niri-session)

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 01 Dec 2023 08:52:14 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3dee7e5522361d15406e740a13b16d00b4138fe4

commit 3dee7e5522361d15406e740a13b16d00b4138fe4
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-12-01 08:49:46 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-12-01 08:51:35 +0000

    x11-wm/niri: set XDG_SESSION_TYPE by default (a la niri-session)
    
    Smithay (unlike wlroots) doesn't seem to set XDG_SESSION_TYPE.
    Mainly affects Qt which prefers XDG_SESSION_TYPE over WAYLAND_DISPLAY.
---
 x11-wm/niri/files/patch-no-systemd | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/x11-wm/niri/files/patch-no-systemd b/x11-wm/niri/files/patch-no-systemd
index f22f4fbf6088..525af9ff06a6 100644
--- a/x11-wm/niri/files/patch-no-systemd
+++ b/x11-wm/niri/files/patch-no-systemd
@@ -42,12 +42,13 @@ Avoid various systemd dependencies
      let cli = Cli::parse();
  
      let _client = tracy_client::Client::start();
-@@ -128,6 +114,9 @@ fn main() {
+@@ -128,6 +114,10 @@ fn main() {
          socket_name.to_string_lossy()
      );
  
 +    // Advise xdg-desktop-portal which *-portals.conf to load
 +    env::set_var("XDG_CURRENT_DESKTOP", "niri");
++    env::set_var("XDG_SESSION_TYPE", "wayland");
 +
      if is_systemd_service {
          // We're starting as a systemd service. Export our variables.