wailsapp / go-webview2

The Wails fork of go-webview2
Other
36 stars 18 forks source link

The system cannot find the file specified. #18

Closed pandason125 closed 2 months ago

pandason125 commented 2 months ago

when the app run a moment or open a new windows may be prompt “ The system cannot find the file specified.”and exit

pandason125 commented 2 months ago

the err postion code: func (i *ICoreWebView2Controller) MoveFocus(reason COREWEBVIEW2_MOVE_FOCUS_REASON) error { var err error

_, _, err = i.vtbl.MoveFocus.Call(
    uintptr(unsafe.Pointer(i)),
    uintptr(reason),
)
if err != windows.ERROR_SUCCESS {
    return err
}
return nil

}

pandason125 commented 2 months ago

may be must modify it like this:

func (i *ICoreWebView2Controller) MoveFocus(reason COREWEBVIEW2_MOVE_FOCUS_REASON) error { var err error

_, _, err = i.vtbl.MoveFocus.Call(
    uintptr(unsafe.Pointer(i)),
    uintptr(unsafe.Pointer(&reason)),//get adress
)
if err != windows.ERROR_SUCCESS {

    return err
}
return nil

}

pandason125 commented 2 months ago
微信图片_20240905152148

when other window can not eject from system Taskbar ,code is triggering this bug

leaanthony commented 2 months ago

Thanks for reporting. Fixed 👍