Skip to content

Commit a603dbe

Browse files
committed
chore: update macOS-specific window handling and version information
1 parent 6ef79e5 commit a603dbe

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

src-tauri/src/commands.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
//! Tauri command handlers
22
33
use crate::state::{AppState, PendingUpdate, UpdateWindowState, UpdateWindowType};
4-
use crate::windows::{
5-
_show_update_window, MACOS_TRAFFIC_LIGHTS_INSET_X, MACOS_TRAFFIC_LIGHTS_INSET_Y,
6-
};
4+
use crate::windows::_show_update_window;
75
use std::sync::{Arc, Mutex};
86
use tauri::{AppHandle, Manager, Theme};
9-
use tauri_plugin_decorum::WebviewWindowExt;
7+
8+
#[cfg(target_os = "macos")]
9+
use {
10+
crate::windows::{MACOS_TRAFFIC_LIGHTS_INSET_X, MACOS_TRAFFIC_LIGHTS_INSET_Y},
11+
tauri_plugin_decorum::WebviewWindowExt,
12+
};
1013

1114
#[tauri::command]
1215
pub fn update_theme(app: AppHandle, is_dark: bool) {

src-tauri/src/version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pub const DESKTOP_VERSION: &str = "0.1.22";
2-
pub const DESKTOP_HASH: &str = "864896e";
3-
pub const DESKTOP_BUILD: &str = "2025-06-20T07:11:07+05:30";
2+
pub const DESKTOP_HASH: &str = "6ef79e5";
3+
pub const DESKTOP_BUILD: &str = "2025-06-20T07:40:58+05:30";
44
pub const DAEMON_VERSION: &str = "0.5.0";
55
pub const DAEMON_HASH: &str = "131f854";
66
pub const DAEMON_BUILD: &str = "2025-06-18T22:12:27+05:30";

src-tauri/src/windows.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::version::{
66
};
77
use tauri::{
88
webview::{DownloadEvent, WebviewWindowBuilder},
9-
AppHandle, Emitter, Manager, WebviewUrl, WindowEvent,
9+
AppHandle, Emitter, Manager, WebviewUrl,
1010
};
1111
use tauri_plugin_decorum::WebviewWindowExt;
1212

@@ -15,7 +15,7 @@ use {
1515
cocoa::appkit::{NSColor, NSView, NSWindow},
1616
cocoa::base::{id, nil, NO, YES},
1717
objc::{msg_send, sel, sel_impl},
18-
tauri::TitleBarStyle,
18+
tauri::{TitleBarStyle, WindowEvent},
1919
};
2020

2121
pub const MACOS_TRAFFIC_LIGHTS_INSET_X: f32 = 16.0;
@@ -29,10 +29,13 @@ pub fn _setup_main_window(app: &AppHandle, url: WebviewUrl) {
2929
.focused(true)
3030
.maximized(true)
3131
.min_inner_size(800.0, 600.0)
32-
.hidden_title(true)
33-
.title_bar_style(TitleBarStyle::Overlay)
3432
.inner_size(1200.0, 720.0);
3533

34+
#[cfg(target_os = "macos")]
35+
let win_builder = win_builder
36+
.title_bar_style(TitleBarStyle::Overlay)
37+
.hidden_title(true);
38+
3639
// Set up download handler
3740
let win_builder = win_builder.on_download(|_webview, event| {
3841
match event {

0 commit comments

Comments
 (0)