File tree Expand file tree Collapse file tree 4 files changed +36
-0
lines changed
Expand file tree Collapse file tree 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> {
22452245 use tao:: platform:: windows:: EventLoopBuilderExtWindows ;
22462246 event_loop_builder. with_msg_hook ( hook) ;
22472247 }
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+ }
22482260 Self :: init ( event_loop_builder. build ( ) )
22492261 }
22502262
Original file line number Diff line number Diff line change @@ -339,6 +339,14 @@ pub trait EventLoopProxy<T: UserEvent>: Debug + Clone + Send + Sync {
339339
340340#[ derive( Default ) ]
341341pub 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 > ,
342350 #[ cfg( windows) ]
343351 pub msg_hook : Option < Box < dyn FnMut ( * const std:: ffi:: c_void ) -> bool + ' static > > ,
344352}
Original file line number Diff line number Diff line change @@ -1633,6 +1633,15 @@ tauri::Builder::default()
16331633 ) ) ;
16341634
16351635 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+
16361645 #[ cfg( windows) ]
16371646 msg_hook : {
16381647 let menus = manager. menu . menus . clone ( ) ;
You can’t perform that action at this time.
0 commit comments