File tree 4 files changed +36
-0
lines changed
4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " tauri " : " patch:enhance"
3
+ " tauri-runtime-wry " : " patch"
4
+ ---
5
+
6
+ Set the gtk application to the identifier defined in ` tauri.conf.json ` to ensure the app uniqueness.
7
+
Original file line number Diff line number Diff line change @@ -2245,6 +2245,18 @@ impl<T: UserEvent> Wry<T> {
2245
2245
use tao:: platform:: windows:: EventLoopBuilderExtWindows ;
2246
2246
event_loop_builder. with_msg_hook ( hook) ;
2247
2247
}
2248
+
2249
+ #[ cfg( any(
2250
+ target_os = "linux" ,
2251
+ target_os = "dragonfly" ,
2252
+ target_os = "freebsd" ,
2253
+ target_os = "netbsd" ,
2254
+ target_os = "openbsd"
2255
+ ) ) ]
2256
+ if let Some ( app_id) = args. app_id {
2257
+ use tao:: platform:: unix:: EventLoopBuilderExtUnix ;
2258
+ event_loop_builder. with_app_id ( app_id) ;
2259
+ }
2248
2260
Self :: init ( event_loop_builder. build ( ) )
2249
2261
}
2250
2262
Original file line number Diff line number Diff line change @@ -339,6 +339,14 @@ pub trait EventLoopProxy<T: UserEvent>: Debug + Clone + Send + Sync {
339
339
340
340
#[ derive( Default ) ]
341
341
pub struct RuntimeInitArgs {
342
+ #[ cfg( any(
343
+ target_os = "linux" ,
344
+ target_os = "dragonfly" ,
345
+ target_os = "freebsd" ,
346
+ target_os = "netbsd" ,
347
+ target_os = "openbsd"
348
+ ) ) ]
349
+ pub app_id : Option < String > ,
342
350
#[ cfg( windows) ]
343
351
pub msg_hook : Option < Box < dyn FnMut ( * const std:: ffi:: c_void ) -> bool + ' static > > ,
344
352
}
Original file line number Diff line number Diff line change @@ -1633,6 +1633,15 @@ tauri::Builder::default()
1633
1633
) ) ;
1634
1634
1635
1635
let runtime_args = RuntimeInitArgs {
1636
+ #[ cfg( any(
1637
+ target_os = "linux" ,
1638
+ target_os = "dragonfly" ,
1639
+ target_os = "freebsd" ,
1640
+ target_os = "netbsd" ,
1641
+ target_os = "openbsd"
1642
+ ) ) ]
1643
+ app_id : Some ( manager. config . identifier . clone ( ) ) ,
1644
+
1636
1645
#[ cfg( windows) ]
1637
1646
msg_hook : {
1638
1647
let menus = manager. menu . menus . clone ( ) ;
You can’t perform that action at this time.
0 commit comments