Skip to content

Commit

Permalink
fix(src/window/window.hh): fix props order to remove warning
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy committed Dec 28, 2023
1 parent f60b453 commit 1148b0f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/android/window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/window/options.hh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace SSC {
bool resizable = true;
bool frameless = false;
bool utility = false;
bool transparent = false;
bool canExit = false;
float width = 0;
float height = 0;
Expand All @@ -20,7 +21,6 @@ namespace SSC {
int port = 0;
bool isTest = false;
bool headless = false;
bool transparent = false;

String cwd = "";
String title = "";
Expand Down
4 changes: 2 additions & 2 deletions src/window/win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ namespace SSC {
webview->add_WebMessageReceived(
Microsoft::WRL::Callback<IRecHandler>([&](ICoreWebView2* webview, IArgs* args) -> HRESULT {
LPWSTR messageRaw;
args->TryGetWebMessageAsString(&messageRaw);
args->TryGetWebMessageAsString(&messageRaw);
SSC::WString message_w(messageRaw);
CoTaskMemFree(messageRaw);
if (onMessage != nullptr) {
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/window/window.hh
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ namespace SSC {
.resizable = opts.resizable,
.frameless = opts.frameless,
.utility = opts.utility,
.transparent = opts.transparent,
.canExit = opts.canExit,
.width = width,
.height = height,
Expand All @@ -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 : "",
Expand Down

0 comments on commit 1148b0f

Please sign in to comment.