Set app_id in eframe NativeOptions

Fixes missing WM_CLASS on Wayland
This commit is contained in:
Luke Street 2024-09-28 10:53:58 -06:00
parent a06382c27e
commit ec9731e1e5
1 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,10 @@ fn main() -> ExitCode {
let app_path = std::env::current_exe().ok(); let app_path = std::env::current_exe().ok();
let exec_path: Rc<Mutex<Option<PathBuf>>> = Rc::new(Mutex::new(None)); let exec_path: Rc<Mutex<Option<PathBuf>>> = Rc::new(Mutex::new(None));
let mut native_options = eframe::NativeOptions::default(); let mut native_options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_app_id(APP_NAME),
..Default::default()
};
match load_icon() { match load_icon() {
Ok(data) => { Ok(data) => {
native_options.viewport.icon = Some(Arc::new(data)); native_options.viewport.icon = Some(Arc::new(data));