Skip to content

Commit

Permalink
Fix creating two primary instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericky Dos Santos committed Feb 9, 2024
1 parent e242322 commit ceb7c28
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/gamescope/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,32 +205,23 @@ impl Manager {
path.clone(),
self.dbus.clone(),
)?;
let changes_rx = primary.listen_for_property_changes()?;
let property_changes_rx = primary.listen_for_property_changes()?;
let window_created_rx = primary.listen_for_window_created()?;
self.dbus.object_server().at(path.clone(), primary).await?;

// Propagate gamescope changes to DBus signals
xwayland::dispatch_primary_property_changes(
self.dbus.clone(),
path.clone(),
changes_rx,
property_changes_rx,
)
.await?;

// Window created events
let primary = xwayland::DBusInterfacePrimary::new(
name.clone(),
path.clone(),
self.dbus.clone(),
)?;

let changes_rx = primary.listen_for_window_created()?;
self.dbus.object_server().at(path.clone(), primary).await?;

// Propagate gamescope changes to DBus signals
xwayland::dispatch_primary_window_created(
self.dbus.clone(),
path.clone(),
changes_rx,
window_created_rx,
)
.await?;
}
Expand Down

0 comments on commit ceb7c28

Please sign in to comment.