Skip to content

Commit

Permalink
fix(src/ipc/routes.cc): use 'height/width' in options for 'window.cre…
Browse files Browse the repository at this point in the history
…ate'
  • Loading branch information
jwerle committed May 7, 2024
1 parent bcc21a1 commit abf7bd1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/publish-npm-modules.sh
Expand Up @@ -111,7 +111,7 @@ declare android_abis=()


if (( !only_platforms || only_top_level )); then
npm run gen
: #npm run gen
elif [[ "arm64" == "$(host_arch)" ]] && [[ "linux" == "$platform" ]]; then
echo "warn - Android not supported on $platform-"$(uname -m)""
else
Expand Down
8 changes: 8 additions & 0 deletions src/ipc/routes.cc
Expand Up @@ -3163,6 +3163,14 @@ static void mapIPCRoutes (Router *router) {
options.margin = std::stof(message.get("margin"));
}

options.width = message.get("width").size()
? window->getSizeInPixels(message.get("width"), screen.width)
: 0;

options.height = message.get("height").size()
? window->getSizeInPixels(message.get("height"), screen.height)
: 0;

options.minWidth = message.get("minWidth").size()
? window->getSizeInPixels(message.get("minWidth"), screen.width)
: 0;
Expand Down

0 comments on commit abf7bd1

Please sign in to comment.