diff --git a/src/main.rs b/src/main.rs index c53f4ca4..00e97e13 100644 --- a/src/main.rs +++ b/src/main.rs @@ -59,11 +59,14 @@ fn main() -> glib::ExitCode { textdomain(GETTEXT_PACKAGE).expect("Invalid string passed to textdomain"); } - // redirect cache dir to %LOCALAPPDATA% #[cfg(target_os = "windows")] { + // redirect cache dir to %LOCALAPPDATA% let config_local_dir = dirs::config_local_dir().expect("Failed to get %LOCALAPPDATA%"); std::env::set_var("XDG_CACHE_HOME", config_local_dir); + + // Temporarily set renderer to gl to avoid memory leak in GTK4.16 + std::env::set_var("GSK_RENDERER", "gl"); } // Initialize the logger diff --git a/src/ui/mod.rs b/src/ui/mod.rs index ca582240..5eb331d8 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -5,7 +5,7 @@ pub mod widgets; use self::models::SETTINGS; use adw::prelude::*; use gtk::gdk::Display; -use gtk::{prelude::*, CssProvider}; +use gtk::CssProvider; pub fn build_ui(app: &adw::Application) { // Create new window and present it