Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

fix: open config folder via tray menu option (regression) (#1332)

Lars Berger27ee4fb6fc4e
diff --git a/packages/wm/src/sys_tray.rs b/packages/wm/src/sys_tray.rs
index 5bacf928..e67479ea 100644
--- a/packages/wm/src/sys_tray.rs
+++ b/packages/wm/src/sys_tray.rs
@@ -227,7 +227,19 @@ impl SystemTray {
match menu_id {
TrayMenuId::ShowConfigFolder => {
- dispatcher.open_file_explorer(config_path)?;
+ dispatcher.open_file_explorer({
+ #[cfg(target_os = "windows")]
+ {
+ config_path.parent().context("Invalid config path.")?
+ }
+ #[cfg(target_os = "macos")]
+ {
+ // On macOS, pass the file path directly since Finder
+ // navigates one level too high with the parent directory.
+ config_path
+ }
+ })?;
+
Ok(())
}
TrayMenuId::ReloadConfig => {