mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-26 11:56:25 -08:00
fix(tauri): correct Linux CEF startup
This commit is contained in:
2 files changed
+11
-12
No files matched your search
@@ -280,6 +280,11 @@ pub fn run() {
|
||||
network::media_protocol::respond,
|
||||
)
|
||||
.setup(|app| {
|
||||
// CEF is initialized during runtime construction; initialize GTK afterward
|
||||
// on the main thread for the Linux tray menu.
|
||||
#[cfg(all(feature = "cef", target_os = "linux"))]
|
||||
gtk::init()?;
|
||||
|
||||
network::native_upload::cleanup_uploads(app.handle());
|
||||
|
||||
#[cfg(any(target_os = "linux", all(debug_assertions, windows)))]
|
||||
|
||||
+6
-12
@@ -16,14 +16,14 @@ fn main() {
|
||||
],
|
||||
deep_link_schemes: vec!["moe.sable.app".into(), "sable".into()],
|
||||
command_line_args: vec![
|
||||
("disable-gpu-sandbox".into(), None),
|
||||
("disable-font-subpixel-positioning".into(), None),
|
||||
("enable-font-antialiasing".into(), None),
|
||||
("--disable-gpu-sandbox".into(), None),
|
||||
("--disable-font-subpixel-positioning".into(), None),
|
||||
("--enable-font-antialiasing".into(), None),
|
||||
("autoplay-policy".into(), Some("no-user-gesture-required".into())),
|
||||
("enable-features".into(), Some("SharedArrayBuffer".into())),
|
||||
("disable-background-timer-throttling".into(), None),
|
||||
("disable-renderer-backgrounding".into(), None),
|
||||
("disable-backgrounding-occluded-windows".into(), None),
|
||||
("--disable-background-timer-throttling".into(), None),
|
||||
("--disable-renderer-backgrounding".into(), None),
|
||||
("--disable-backgrounding-occluded-windows".into(), None),
|
||||
("disable-features".into(), Some(
|
||||
"SpareRendererForSitePerProcess,IntensiveWakeUpThrottling,CalculateNativeWinOcclusion,AutofillActorMode,GlicActorUi,LensOverlay".into()
|
||||
)),
|
||||
@@ -148,12 +148,6 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
// CEF doesn't init GTK, but the Linux tray menu needs it.
|
||||
#[cfg(all(feature = "cef", target_os = "linux"))]
|
||||
{
|
||||
let _ = gtk::init();
|
||||
}
|
||||
|
||||
// Deep-link primary: hold the forwarding socket for the process lifetime.
|
||||
#[cfg(all(feature = "cef", target_os = "linux"))]
|
||||
let _deep_link_guard = app_lib::deep_link_ipc::bind_and_listen();
|
||||
|
||||
Reference in new issue
Block a user