mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
hotfix: build issue for windows
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
// Version - Wails version
|
// Version - Wails version
|
||||||
const Version = "v0.18.12-pre"
|
const Version = "v0.18.13-pre"
|
||||||
|
|||||||
@@ -217,21 +217,6 @@ struct webview_priv
|
|||||||
va_end(ap);
|
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)
|
static int webview_js_encode(const char *s, char *esc, size_t n)
|
||||||
{
|
{
|
||||||
int r = 1; /* At least one byte for trailing zero */
|
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)
|
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);
|
SetWindowText(w->priv.hwnd, title);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)
|
WEBVIEW_API void webview_set_fullscreen(struct webview *w, int fullscreen)
|
||||||
{
|
{
|
||||||
if (w->priv.is_fullscreen == !!fullscreen)
|
if (w->priv.is_fullscreen == !!fullscreen)
|
||||||
|
|||||||
Reference in New Issue
Block a user