From ceb7c28bd1d77d8f9f23742bd5d3d24a370f4550 Mon Sep 17 00:00:00 2001 From: Ericky Dos Santos Date: Fri, 9 Feb 2024 17:25:49 -0500 Subject: [PATCH] Fix creating two primary instances --- src/gamescope/manager.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/gamescope/manager.rs b/src/gamescope/manager.rs index 189a25a..a16306e 100644 --- a/src/gamescope/manager.rs +++ b/src/gamescope/manager.rs @@ -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?; }