unsafe fn taskbar_mark_fullscreen(handle: HWND, fullscreen: bool) {
    com_initialized();

    TASKBAR_LIST2.with(|task_bar_list2_ptr| {
        let mut task_bar_list2 = task_bar_list2_ptr.get();

        if task_bar_list2.is_null() {
            let hr = CoCreateInstance(
                &CLSID_TaskbarList,
                ptr::null_mut(),
                CLSCTX_ALL,
                &IID_ITaskbarList2,
                &mut task_bar_list2 as *mut _ as *mut _,
            );

            let hr_init = (*(*task_bar_list2).lpVtbl).parent.HrInit;

            if hr != S_OK || hr_init(task_bar_list2.cast()) != S_OK {
                // In some old windows, the taskbar object could not be created, we just ignore it
                return;
            }
            task_bar_list2_ptr.set(task_bar_list2)
        }

        task_bar_list2 = task_bar_list2_ptr.get();
        let mark_fullscreen_window = (*(*task_bar_list2).lpVtbl).MarkFullscreenWindow;
        mark_fullscreen_window(task_bar_list2, handle, if fullscreen { 1 } else { 0 });
    })
}
// Reference Implementation:
// https://github.com/chromium/chromium/blob/f18e79d901f56154f80eea1e2218544285e62623/ui/views/win/fullscreen_handler.cc
//
// As per MSDN marking the window as fullscreen should ensure that the
// taskbar is moved to the bottom of the Z-order when the fullscreen window
// is activated. If the window is not fullscreen, the Shell falls back to
// heuristics to determine how the window should be treated, which means
// that it could still consider the window as fullscreen. :(


As per MSDN marking the window as fullscreen should ensure that the
taskbar is moved to the bottom of the Z-order when the fullscreen window
is activated. If the window is not fullscreen, the Shell falls back to
heuristics to determine how the window should be treated, which means
that it could still consider the window as fullscreen.
As per MSDN marking the window as fullscreen should ensure that the taskbar is moved to the bottom of the Z - order when the fullscreen window is activated . If the window is not fullscreen the Shell falls back to heuristics to determine how the window should be treated which means that it could still consider the window as fullscreen .
unsafe fn taskbar_mark_fullscreen(handle: HWND, fullscreen: bool) {
    com_initialized();
    TASKBAR_LIST2.with(|task_bar_list2_ptr| {
        let mut task_bar_list2 = task_bar_list2_ptr.get();
        if task_bar_list2.is_null() {
            let hr = CoCreateInstance(
                &CLSID_TaskbarList,
                ptr::null_mut(),
                CLSCTX_ALL,
                &IID_ITaskbarList2,
                &mut task_bar_list2 as *mut _ as *mut _,
            );
            let hr_init = (*(*task_bar_list2).lpVtbl).parent.HrInit;
            if hr != S_OK || hr_init(task_bar_list2.cast()) != S_OK {
                // In some old windows, the taskbar object could not be created, we just ignore it
                return;
            }
            task_bar_list2_ptr.set(task_bar_list2)
        }
        task_bar_list2 = task_bar_list2_ptr.get();
        let mark_fullscreen_window = (*(*task_bar_list2).lpVtbl).MarkFullscreenWindow;
        mark_fullscreen_window(task_bar_list2, handle, if fullscreen { 1 } else { 0 });
    })
}
unsafe fn taskbar_mark_fullscreen ( handle : HWND , fullscreen : bool ) { com_initialized ( ) ; TASKBAR_LIST2 . with ( | task_bar_list2_ptr | { let mut task_bar_list2 = task_bar_list2_ptr . get ( ) ; if task_bar_list2 . is_null ( ) { let hr = CoCreateInstance ( & CLSID_TaskbarList , ptr :: null_mut ( ) , CLSCTX_ALL , & IID_ITaskbarList2 , & mut task_bar_list2 as * mut _ as * mut _ , ) ; let hr_init = ( * ( * task_bar_list2 ) . lpVtbl ) . parent . HrInit ; if hr != S_OK || hr_init ( task_bar_list2 . cast ( ) ) != S_OK { // In some old windows, the taskbar object could not be created, we just ignore it return ; } task_bar_list2_ptr . set ( task_bar_list2 ) } task_bar_list2 = task_bar_list2_ptr . get ( ) ; let mark_fullscreen_window = ( * ( * task_bar_list2 ) . lpVtbl ) . MarkFullscreenWindow ; mark_fullscreen_window ( task_bar_list2 , handle , if fullscreen { 1 } else { 0 } ) ; } ) }
Reference Implementation:
https://github.com/chromium/chromium/blob/f18e79d901f56154f80eea1e2218544285e62623/ui/views/win/fullscreen_handler.cc
Reference Implementation : https : // github . com / chromium / chromium / blob / f18e79d901f56154f80eea1e2218544285e62623 / ui / views / win / fullscreen_handler . cc
handle
HWND
fullscreen
bool