@@ -154,7 +154,7 @@ pub enum Message {
154
154
LauncherEvent ( launcher:: Event ) ,
155
155
Layer ( LayerEvent ) ,
156
156
KeyboardNav ( keyboard_nav:: Message ) ,
157
- ActivationToken ( Option < String > , String , GpuPreference ) ,
157
+ ActivationToken ( Option < String > , String , String , GpuPreference ) ,
158
158
AltTab ,
159
159
AltRelease ,
160
160
}
@@ -206,7 +206,7 @@ impl CosmicLauncher {
206
206
}
207
207
}
208
208
209
- async fn launch ( token : Option < String > , exec : String , gpu : GpuPreference ) {
209
+ async fn launch ( token : Option < String > , app_id : String , exec : String , gpu : GpuPreference ) {
210
210
let mut envs = Vec :: new ( ) ;
211
211
if let Some ( token) = token {
212
212
envs. push ( ( "XDG_ACTIVATION_TOKEN" . to_string ( ) , token. clone ( ) ) ) ;
@@ -217,7 +217,7 @@ async fn launch(token: Option<String>, exec: String, gpu: GpuPreference) {
217
217
envs. extend ( gpu_envs) ;
218
218
}
219
219
220
- cosmic:: desktop:: spawn_desktop_exec ( exec, envs) ;
220
+ cosmic:: desktop:: spawn_desktop_exec ( exec, envs, Some ( & app_id ) ) . await ;
221
221
}
222
222
223
223
async fn try_get_gpu_envs ( gpu : GpuPreference ) -> Option < HashMap < String , String > > {
@@ -414,6 +414,7 @@ impl cosmic::Application for CosmicLauncher {
414
414
move |token| {
415
415
cosmic:: app:: Message :: App ( Message :: ActivationToken (
416
416
token,
417
+ entry. id . to_string ( ) ,
417
418
exec,
418
419
gpu_preference,
419
420
) )
@@ -500,8 +501,8 @@ impl cosmic::Application for CosmicLauncher {
500
501
_ => { }
501
502
} ;
502
503
}
503
- Message :: ActivationToken ( token, exec, dgpu) => {
504
- return Command :: perform ( launch ( token, exec, dgpu) , |( ) | {
504
+ Message :: ActivationToken ( token, app_id , exec, dgpu) => {
505
+ return Command :: perform ( launch ( token, app_id , exec, dgpu) , |( ) | {
505
506
cosmic:: app:: message:: app ( Message :: Hide )
506
507
} ) ;
507
508
}
0 commit comments