From dbea6b5dbf1c614d3f032944483b8d838117562d Mon Sep 17 00:00:00 2001 From: Sergey Rubanov Date: Thu, 28 Dec 2023 16:35:43 +0100 Subject: [PATCH] fix(src/window/window.hh): fix props order to remove warning --- src/android/window.cc | 3 ++- src/window/win.cc | 4 ++-- src/window/window.hh | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/android/window.cc b/src/android/window.cc index 72fc312b38..827caadb54 100644 --- a/src/android/window.cc +++ b/src/android/window.cc @@ -44,7 +44,8 @@ namespace SSC::android { const auto argv = this->config["ssc_argv"]; options.headless = this->config["build_headless"] == "true"; - options.transparent = this->config["build_transparent"] == "true"; + // TODO: not implemented yet on mobile + // options.transparent = this->config["build_transparent"] == "true"; options.debug = isDebugEnabled() ? true : false; options.env = stream.str(); options.cwd = rootDirectory.str(); diff --git a/src/window/win.cc b/src/window/win.cc index 76b2b90b3b..8c05f2a372 100644 --- a/src/window/win.cc +++ b/src/window/win.cc @@ -1224,7 +1224,7 @@ namespace SSC { webview->add_WebMessageReceived( Microsoft::WRL::Callback([&](ICoreWebView2* webview, IArgs* args) -> HRESULT { LPWSTR messageRaw; - args->TryGetWebMessageAsString(&messageRaw); + args->TryGetWebMessageAsString(&messageRaw); SSC::WString message_w(messageRaw); CoTaskMemFree(messageRaw); if (onMessage != nullptr) { @@ -1422,7 +1422,7 @@ namespace SSC { } void Window::exit (int code) { - if (this->onExit != nullptr) + if (this->onExit != nullptr) { std::cerr << "WARNING: Window#" << index << " exiting with code " << code << std::endl; this->onExit(code); diff --git a/src/window/window.hh b/src/window/window.hh index 72d570e165..2a90c9a10c 100644 --- a/src/window/window.hh +++ b/src/window/window.hh @@ -589,6 +589,7 @@ namespace SSC { .frameless = opts.frameless, .utility = opts.utility, .canExit = opts.canExit, + .transparent = opts.transparent, .width = width, .height = height, .minWidth = minWidth, @@ -599,7 +600,6 @@ namespace SSC { .debug = isDebugEnabled() || opts.debug, .isTest = this->options.isTest, .headless = this->options.headless || opts.headless || opts.appData["build_headless"] == "true", - .transparent = opts.transparent, .cwd = this->options.cwd, .title = opts.title.size() > 0 ? opts.title : "", @@ -631,8 +631,8 @@ namespace SSC { .resizable = opts.resizable, .frameless = opts.frameless, .utility = opts.utility, - .transparent = opts.transparent, .canExit = true, + .transparent = opts.transparent, .width = opts.width, .height = opts.height, .index = 0,