Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions apps/desktop-tauri/src-tauri/src/shell/dwm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,6 @@ unsafe extern "system" {
) -> i32;
}

#[cfg(windows)]
#[link(name = "gdi32")]
unsafe extern "system" {
fn CreateSolidBrush(color: u32) -> isize;
}

#[cfg(windows)]
static DARK_BRUSH: std::sync::OnceLock<isize> = std::sync::OnceLock::new();

#[cfg(windows)]
const WM_NCCALCSIZE: u32 = 0x0083;
#[cfg(windows)]
Expand Down Expand Up @@ -300,13 +291,6 @@ fn apply_chrome(win: &tauri::WebviewWindow, chrome: Chrome) {
let ok = SetWindowSubclass(hwnd, borderless_subclass_proc, BORDERLESS_SUBCLASS_ID, 0);
tracing::info!("dwm: subclass installed={ok}");

// Set background brush to dark (reuse a single GDI brush)
const GCL_HBRBACKGROUND: i32 = -10;
let brush = *DARK_BRUSH.get_or_init(|| CreateSolidBrush(0x001C1C1E));
if brush != 0 {
SetWindowLongPtrW(hwnd, GCL_HBRBACKGROUND, brush);
}

// Remove WS_CAPTION; only strip WS_THICKFRAME for non-resizable windows
const GWL_STYLE: i32 = -16;
const WS_CAPTION: isize = 0x00C00000;
Expand Down