hotfix: build issue for windows

This commit is contained in:
Lea Anthony 2019-10-25 18:21:18 +11:00
commit 82e00ff83a
2 changed files with 12 additions and 16 deletions

View file

@ -1,4 +1,4 @@
package cmd
// Version - Wails version
const Version = "v0.18.12-pre"
const Version = "v0.18.13-pre"

View file

@ -217,21 +217,6 @@ struct webview_priv
va_end(ap);
}
WEBVIEW_API void webview_set_title(struct webview *w, const char *title)
{
#ifdef UNICODE
wchar_t *u16title = webview_to_utf16(title);
if (u16title == NULL)
{
return;
}
SetWindowText(w->priv.hwnd, u16title);
GlobalFree(u16title);
#else
SetWindowText(w->priv.hwnd, title);
#endif
}
static int webview_js_encode(const char *s, char *esc, size_t n)
{
int r = 1; /* At least one byte for trailing zero */
@ -1618,9 +1603,20 @@ struct webview_priv
WEBVIEW_API void webview_set_title(struct webview *w, const char *title)
{
#ifdef UNICODE
wchar_t *u16title = webview_to_utf16(title);
if (u16title == NULL)
{
return;
}
SetWindowText(w->priv.hwnd, u16title);
GlobalFree(u16title);
#else
SetWindowText(w->priv.hwnd, title);
#endif
}
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)
{
if (w->priv.is_fullscreen == !!fullscreen)