Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d030f1360a | |||
| e97535e41b | |||
| b518572d0f | |||
| b3ed7fb292 | |||
| 358c228645 | |||
| a4564f2b71 |
@@ -3,6 +3,19 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
Format based on [Keep a Changelog](https://keepachangelog.com/).
|
Format based on [Keep a Changelog](https://keepachangelog.com/).
|
||||||
|
|
||||||
|
## [0.8.0] - 2026-03-30
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Replace `canonicalize()` with `symlink_metadata` + `is_file` + `!is_symlink` for avatar lookup — prevents symlink traversal to arbitrary files
|
||||||
|
- Replace `canonicalize()` with same symlink-safe check in `resolve_background_path`
|
||||||
|
- Downscale wallpaper to `MAX_BLUR_DIMENSION` (1920px) before GPU blur — prevents excessive memory use on high-res images
|
||||||
|
- Validate `background_blur` per config source — invalid user value preserves system default instead of silently falling back to 0
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix blur padding offset from `(0,0)` to `(-pad,-pad)` to prevent edge darkening on blurred wallpaper
|
||||||
|
|
||||||
## [0.7.3] - 2026-03-29
|
## [0.7.3] - 2026-03-29
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
Generated
+1
-1
@@ -616,7 +616,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "moonset"
|
name = "moonset"
|
||||||
version = "0.8.0"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dirs",
|
"dirs",
|
||||||
"gdk-pixbuf",
|
"gdk-pixbuf",
|
||||||
|
|||||||
+6
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "moonset"
|
name = "moonset"
|
||||||
version = "0.8.0"
|
version = "0.8.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
description = "Wayland session power menu with GTK4 and Layer Shell"
|
description = "Wayland session power menu with GTK4 and Layer Shell"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@@ -22,5 +22,10 @@ systemd-journal-logger = "2.2"
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempfile = "3"
|
tempfile = "3"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
lto = "thin"
|
||||||
|
codegen-units = 1
|
||||||
|
strip = true
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
glib-build-tools = "0.22"
|
glib-build-tools = "0.22"
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
Architectural and design decisions for Moonset, in reverse chronological order.
|
Architectural and design decisions for Moonset, in reverse chronological order.
|
||||||
|
|
||||||
|
## 2026-03-31 – Fourth audit: release profile, GResource compression, lock stderr, sync markers
|
||||||
|
|
||||||
|
- **Who**: Ragnar, Dom
|
||||||
|
- **Why**: Fourth triple audit found missing release profile (LTO/strip), uncompressed GResource assets, moonlock stderr suppressed (errors invisible), and duplicated code without sync markers.
|
||||||
|
- **Tradeoffs**: moonlock stderr now inherited instead of null — errors appear in moonset's journal context. Acceptable for debugging, no security leak since moonlock logs to its own journal identifier.
|
||||||
|
- **How**: (1) `[profile.release]` with LTO, codegen-units=1, strip. (2) `compressed="true"` on GResource entries. (3) `Stdio::inherit()` for moonlock stderr in lock(). (4) SYNC comments on duplicated blur/background functions.
|
||||||
|
|
||||||
## 2026-03-28 – Remove wallpaper from GResource bundle
|
## 2026-03-28 – Remove wallpaper from GResource bundle
|
||||||
|
|
||||||
- **Who**: Ragnar, Dom
|
- **Who**: Ragnar, Dom
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// ABOUTME: Build script for compiling GResource bundle.
|
// ABOUTME: Build script for compiling GResource bundle.
|
||||||
// ABOUTME: Bundles style.css, wallpaper.jpg, and default-avatar.svg into the binary.
|
// ABOUTME: Bundles style.css and default-avatar.svg into the binary.
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
glib_build_tools::compile_resources(
|
glib_build_tools::compile_resources(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gresources>
|
<gresources>
|
||||||
<gresource prefix="/dev/moonarch/moonset">
|
<gresource prefix="/dev/moonarch/moonset">
|
||||||
<file>style.css</file>
|
<file compressed="true">style.css</file>
|
||||||
<file>default-avatar.svg</file>
|
<file compressed="true">default-avatar.svg</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
</gresources>
|
</gresources>
|
||||||
|
|||||||
+17
-1
@@ -103,6 +103,10 @@ pub fn load_background_texture(bg_path: Option<&Path>) -> Option<gdk::Texture> {
|
|||||||
|
|
||||||
// -- GPU blur via GskBlurNode -------------------------------------------------
|
// -- GPU blur via GskBlurNode -------------------------------------------------
|
||||||
|
|
||||||
|
// SYNC: MAX_BLUR_DIMENSION, render_blurred_texture, and create_background_picture
|
||||||
|
// are duplicated in moonlock/src/lockscreen.rs and moongreet/src/greeter.rs.
|
||||||
|
// Changes here must be mirrored to the other two projects.
|
||||||
|
|
||||||
/// Maximum texture dimension before downscaling for blur.
|
/// Maximum texture dimension before downscaling for blur.
|
||||||
/// Keeps GPU work reasonable on 4K+ displays.
|
/// Keeps GPU work reasonable on 4K+ displays.
|
||||||
const MAX_BLUR_DIMENSION: f32 = 1920.0;
|
const MAX_BLUR_DIMENSION: f32 = 1920.0;
|
||||||
@@ -288,6 +292,7 @@ pub fn create_panel_window(texture: Option<&gdk::Texture>, blur_radius: Option<f
|
|||||||
&confirm_area,
|
&confirm_area,
|
||||||
&confirm_box,
|
&confirm_box,
|
||||||
&error_label,
|
&error_label,
|
||||||
|
&button_box,
|
||||||
);
|
);
|
||||||
button_box.append(&button);
|
button_box.append(&button);
|
||||||
}
|
}
|
||||||
@@ -371,6 +376,7 @@ fn create_action_button(
|
|||||||
confirm_area: >k::Box,
|
confirm_area: >k::Box,
|
||||||
confirm_box: &Rc<RefCell<Option<gtk::Box>>>,
|
confirm_box: &Rc<RefCell<Option<gtk::Box>>>,
|
||||||
error_label: >k::Label,
|
error_label: >k::Label,
|
||||||
|
button_box: >k::Box,
|
||||||
) -> gtk::Button {
|
) -> gtk::Button {
|
||||||
let button_content = gtk::Box::new(gtk::Orientation::Vertical, 4);
|
let button_content = gtk::Box::new(gtk::Orientation::Vertical, 4);
|
||||||
button_content.set_halign(gtk::Align::Center);
|
button_content.set_halign(gtk::Align::Center);
|
||||||
@@ -400,6 +406,8 @@ fn create_action_button(
|
|||||||
confirm_box,
|
confirm_box,
|
||||||
#[weak]
|
#[weak]
|
||||||
error_label,
|
error_label,
|
||||||
|
#[weak]
|
||||||
|
button_box,
|
||||||
move |_| {
|
move |_| {
|
||||||
on_action_clicked(
|
on_action_clicked(
|
||||||
&action_def,
|
&action_def,
|
||||||
@@ -408,6 +416,7 @@ fn create_action_button(
|
|||||||
&confirm_area,
|
&confirm_area,
|
||||||
&confirm_box,
|
&confirm_box,
|
||||||
&error_label,
|
&error_label,
|
||||||
|
&button_box,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
@@ -430,6 +439,7 @@ fn on_action_clicked(
|
|||||||
confirm_area: >k::Box,
|
confirm_area: >k::Box,
|
||||||
confirm_box: &Rc<RefCell<Option<gtk::Box>>>,
|
confirm_box: &Rc<RefCell<Option<gtk::Box>>>,
|
||||||
error_label: >k::Label,
|
error_label: >k::Label,
|
||||||
|
button_box: >k::Box,
|
||||||
) {
|
) {
|
||||||
dismiss_confirm(confirm_area, confirm_box);
|
dismiss_confirm(confirm_area, confirm_box);
|
||||||
error_label.set_visible(false);
|
error_label.set_visible(false);
|
||||||
@@ -439,7 +449,7 @@ fn on_action_clicked(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
show_confirm(action_def, strings, app, confirm_area, confirm_box, error_label);
|
show_confirm(action_def, strings, app, confirm_area, confirm_box, error_label, button_box);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Show inline confirmation below the action buttons.
|
/// Show inline confirmation below the action buttons.
|
||||||
@@ -450,6 +460,7 @@ fn show_confirm(
|
|||||||
confirm_area: >k::Box,
|
confirm_area: >k::Box,
|
||||||
confirm_box: &Rc<RefCell<Option<gtk::Box>>>,
|
confirm_box: &Rc<RefCell<Option<gtk::Box>>>,
|
||||||
error_label: >k::Label,
|
error_label: >k::Label,
|
||||||
|
button_box: >k::Box,
|
||||||
) {
|
) {
|
||||||
let new_box = gtk::Box::new(gtk::Orientation::Vertical, 8);
|
let new_box = gtk::Box::new(gtk::Orientation::Vertical, 8);
|
||||||
new_box.set_halign(gtk::Align::Center);
|
new_box.set_halign(gtk::Align::Center);
|
||||||
@@ -497,8 +508,13 @@ fn show_confirm(
|
|||||||
confirm_area,
|
confirm_area,
|
||||||
#[strong]
|
#[strong]
|
||||||
confirm_box,
|
confirm_box,
|
||||||
|
#[weak]
|
||||||
|
button_box,
|
||||||
move |_| {
|
move |_| {
|
||||||
dismiss_confirm(&confirm_area, &confirm_box);
|
dismiss_confirm(&confirm_area, &confirm_box);
|
||||||
|
if let Some(first) = button_box.first_child() {
|
||||||
|
first.grab_focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
button_row.append(&no_btn);
|
button_row.append(&no_btn);
|
||||||
|
|||||||
+1
-1
@@ -107,7 +107,7 @@ pub fn lock() -> Result<(), PowerError> {
|
|||||||
Command::new("/usr/bin/moonlock")
|
Command::new("/usr/bin/moonlock")
|
||||||
.stdin(Stdio::null())
|
.stdin(Stdio::null())
|
||||||
.stdout(Stdio::null())
|
.stdout(Stdio::null())
|
||||||
.stderr(Stdio::null())
|
.stderr(Stdio::inherit())
|
||||||
.spawn()
|
.spawn()
|
||||||
.map_err(|e| PowerError::CommandFailed {
|
.map_err(|e| PowerError::CommandFailed {
|
||||||
action: "lock",
|
action: "lock",
|
||||||
|
|||||||
Reference in New Issue
Block a user