fix: address audit findings — security, performance, and correctness
- Use absolute paths for all binaries in power.rs to prevent PATH hijacking - Implement POWER_TIMEOUT via try_wait() polling (was declared but unused) - Fix potential panic in load_background_texture when GResource path fails to_str() — now falls back to known wallpaper resource path - Compress wallpaper.jpg in GResource bundle (saves ~374 KB in binary) - Merge double idle_add_local_once into single cycle for faster focus - Centralize GRESOURCE_PREFIX as pub(crate) const in main.rs - Fix fallback user UID from 0 (root) to u32::MAX - Fix CSS comment: "square card" → "circular card" (border-radius: 50%)
This commit is contained in:
+3
-1
@@ -12,9 +12,11 @@ use gtk4::prelude::*;
|
||||
use gtk4::{self as gtk, gio};
|
||||
use gtk4_layer_shell::LayerShell;
|
||||
|
||||
pub(crate) const GRESOURCE_PREFIX: &str = "/dev/moonarch/moonset";
|
||||
|
||||
fn load_css(display: &gdk::Display) {
|
||||
let css_provider = gtk::CssProvider::new();
|
||||
css_provider.load_from_resource("/dev/moonarch/moonset/style.css");
|
||||
css_provider.load_from_resource(&format!("{GRESOURCE_PREFIX}/style.css"));
|
||||
gtk::style_context_add_provider_for_display(
|
||||
display,
|
||||
&css_provider,
|
||||
|
||||
Reference in New Issue
Block a user