Replies: 3 comments 1 reply
-
I'm not quite sure of your architecture. Are you using another library than Slint that uses Winit? If you can't use the winit backend, you can also control the Slint event loop yourself from any thread using the |
Beta Was this translation helpful? Give feedback.
-
My App uses tauri-apps/tray-icon, it doesn't provide a winit backend, but it needs winit to run. if I want to add a slint window to my App, then two winit backends will conflict, so for now I can only wait for slint to implement the task tray icon, tray-icon is open source software, maybe slint can consider to insert tray-icon into event_loop. If slint doesn't have any plans to implement the tray-icon feature, then I'm willing to wait, because I really enjoy developing Native GUIs with slint, and I hate web apps 😛 . |
Beta Was this translation helpful? Give feedback.
-
I using another process for my needs finally use std::process::Command;
mod tray_icon;
mod app;
pub const ARGS_APP:&str = "app";
fn main() {
let args: Vec<String> = std::env::args().collect();
if args.len() > 1{
let arg1 = args[1].to_lowercase();
if arg1.starts_with(ARGS_APP) {
return app::main().unwrap();
}
}
open_app();
tray_icon::main();
}
pub fn open_app(){
let _ = start_process(vec![ARGS_APP.to_string()]);
}
fn start_process(command_args: Vec<String>) {
let current_exe = std::env::current_exe().unwrap();
Command::new(current_exe)
.args(&command_args)
.spawn().unwrap();
} edit |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a taskbar app MessAuto, tray-icon where the event loop can only happen in the main thread (on macOS), I implemented a hover window today via slint and when I tried to merge them together I found it almost impossible, can I have any solution?
Beta Was this translation helpful? Give feedback.
All reactions