Closes #ISSUE

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Piotr Osiewicz
2025-02-28 18:33:35 +01:00
committed by GitHub
co-authored by Anthony Eid
parent fc52b43159
commit e4e758db3a
68 changed files with 180 additions and 190 deletions
+3 -3
View File
@@ -1221,10 +1221,10 @@ fn set_window_composition_attribute(hwnd: HWND, color: Option<Color>, state: u32
unsafe {
type SetWindowCompositionAttributeType =
unsafe extern "system" fn(HWND, *mut WINDOWCOMPOSITIONATTRIBDATA) -> BOOL;
let module_name = PCSTR::from_raw("user32.dll\0".as_ptr());
let module_name = PCSTR::from_raw(c"user32.dll".as_ptr() as *const u8);
let user32 = GetModuleHandleA(module_name);
if user32.is_ok() {
let func_name = PCSTR::from_raw("SetWindowCompositionAttribute\0".as_ptr());
let func_name = PCSTR::from_raw(c"SetWindowCompositionAttribute".as_ptr() as *const u8);
let set_window_composition_attribute: SetWindowCompositionAttributeType =
std::mem::transmute(GetProcAddress(user32.unwrap(), func_name));
let mut color = color.unwrap_or_default();
@@ -1238,7 +1238,7 @@ fn set_window_composition_attribute(hwnd: HWND, color: Option<Color>, state: u32
gradient_color: (color.0 as u32)
| ((color.1 as u32) << 8)
| ((color.2 as u32) << 16)
| (color.3 as u32) << 24,
| ((color.3 as u32) << 24),
animation_id: 0,
};
let mut data = WINDOWCOMPOSITIONATTRIBDATA {