Skip to content

Commit f09d02c

Browse files
committed
Do not start xdg-desktop-portal-cosmic; so socket activation can
pop-os/xdg-desktop-portal-cosmic#176
1 parent 379ce30 commit f09d02c

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

Justfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ target := if debug == '1' { 'debug' } else { 'release' }
99
vendor_args := if vendor == '1' { '--frozen --offline' } else { '' }
1010
debug_args := if debug == '1' { '' } else { '--release' }
1111
cargo_args := vendor_args + ' ' + debug_args
12-
xdp_cosmic := '/usr/libexec/xdg-desktop-portal-cosmic'
1312
orca := '/usr/bin/orca'
1413
cosmic_dconf_profile := prefix + '/share/dconf/profile/cosmic'
1514

@@ -21,7 +20,7 @@ applicationdir := rootdir / prefix + '/share/applications'
2120
all: _extract_vendor build
2221

2322
build:
24-
XDP_COSMIC={{xdp_cosmic}} ORCA={{orca}} cargo build {{cargo_args}}
23+
ORCA={{orca}} cargo build {{cargo_args}}
2524

2625
# Installs files into the system
2726
install:

src/main.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ use tracing::{Instrument, metadata::LevelFilter};
4646
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
4747

4848
use crate::notifications::notifications_process;
49-
const XDP_COSMIC: Option<&'static str> = option_env!("XDP_COSMIC");
5049
#[cfg(feature = "autostart")]
5150
const AUTOSTART_DIR: &'static str = "autostart";
5251
#[cfg(feature = "autostart")]
@@ -427,29 +426,6 @@ async fn start(
427426
)
428427
.await;
429428

430-
if env::var("XDG_CURRENT_DESKTOP").as_deref() == Ok("COSMIC") {
431-
let span = info_span!(parent: None, "xdg-desktop-portal-cosmic");
432-
let mut sockets = Vec::with_capacity(1);
433-
let extra_env = Vec::with_capacity(1);
434-
let portal_extras =
435-
if let Ok((mut env, fd)) = create_privileged_socket(&mut sockets, &extra_env) {
436-
let mut env = env.remove(0);
437-
env.0 = "PORTAL_WAYLAND_SOCKET".to_string();
438-
vec![(fd, env, sockets.remove(0))]
439-
} else {
440-
Vec::new()
441-
};
442-
start_component(
443-
XDP_COSMIC.unwrap_or("/usr/libexec/xdg-desktop-portal-cosmic"),
444-
span,
445-
&process_manager,
446-
&env_vars,
447-
&socket_tx,
448-
portal_extras,
449-
)
450-
.await;
451-
}
452-
453429
#[cfg(feature = "autostart")]
454430
if !*is_systemd_used() {
455431
info!("looking for autostart folders");

0 commit comments

Comments
 (0)