saucer: Window started with wrong title size on 200% scaled desktop (Windows)

✍️ Bug Description

  • embedding.exe started, created window (I can see title “Automated…” partially, but window content show desktop bitmap, newer repainted?), Dev Tools are visible fully, but app exits after a few seconds.

Image

  • desktop_example.exe working correctly except title is cropped:

Image

After window resize title resets to correct size.

  • Everything working OK on Mac (except strange “Edit” menu but it will be another issue)

🔁 Steps to reproduce

C:\Users\vt\Documents\saucer>mkdir build

C:\Users\vt\Documents\saucer>cd build

C:\Users\vt\Documents\saucer\build>cmake .. -Dsaucer_examples=ON -G"NMake Makefiles"
-- The CXX compiler identification is MSVC 19.43.34810.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [saucer] Avoiding local packages as 'saucer_prefer_remote' is ON
-- [saucer] Backend is 'Defaut', using WebView2
-- Performing Test has_jthread
-- Performing Test has_jthread - Success
-- Performing Test has_move_only_function
-- Performing Test has_move_only_function - Success
-- Performing Test has_expected
-- Performing Test has_expected - Success
-- CPM: Adding package lockpp@3.0 (v3.0)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(lockpp) is deprecated, call
  FetchContent_MakeAvailable(lockpp) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(lockpp) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:289 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: Adding package boost_callable_traits@ (boost-1.87.0)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(boost_callable_traits) is deprecated, call
  FetchContent_MakeAvailable(boost_callable_traits) instead.  Policy CMP0169
  can be set to OLD to allow FetchContent_Populate(boost_callable_traits) to
  be called directly for now, but the ability to call it with declared
  details will be removed completely in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:295 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: Adding package ereignis@4.3 (v4.3)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(ereignis) is deprecated, call
  FetchContent_MakeAvailable(ereignis) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(ereignis) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:301 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: Adding package fmt@11.1.1 (11.1.1)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(fmt) is deprecated, call
  FetchContent_MakeAvailable(fmt) instead.  Policy CMP0169 can be set to OLD
  to allow FetchContent_Populate(fmt) to be called directly for now, but the
  ability to call it with declared details will be removed completely in a
  future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:307 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- {fmt} version: 11.1.1
-- Build type: Debug
-- CPM: Adding package flagpp@3.0 (v3.0)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(flagpp) is deprecated, call
  FetchContent_MakeAvailable(flagpp) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(flagpp) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:313 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: Adding package rebind@5.1.1 (v5.1.1)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(rebind) is deprecated, call
  FetchContent_MakeAvailable(rebind) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(rebind) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:319 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: rebind: Adding package boost_preprocessor@ (boost-1.86.0)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(boost_preprocessor) is deprecated, call
  FetchContent_MakeAvailable(boost_preprocessor) instead.  Policy CMP0169 can
  be set to OLD to allow FetchContent_Populate(boost_preprocessor) to be
  called directly for now, but the ability to call it with declared details
  will be removed completely in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  build/_deps/rebind-src/CMakeLists.txt:32 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: Adding package poolparty@3.0.1 (v3.0.1)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(poolparty) is deprecated, call
  FetchContent_MakeAvailable(poolparty) instead.  Policy CMP0169 can be set
  to OLD to allow FetchContent_Populate(poolparty) to be called directly for
  now, but the ability to call it with declared details will be removed
  completely in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:325 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- CPM: Adding package eraser@2.2.1 (v2.2.1)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(eraser) is deprecated, call
  FetchContent_MakeAvailable(eraser) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(eraser) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:331 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- [NuGet] Downloading Package: Microsoft.Web.WebView2 [1.0.2903.40]
-- [NuGet] NuGet-CLI not found, downloading...
-- [NuGet] Found at: C:/Users/vt/Documents/saucer/build/nuget/nuget.exe [6.13.2.1]
-- CPM: Adding package glaze@4.2.4 (v4.2.4)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(glaze) is deprecated, call
  FetchContent_MakeAvailable(glaze) instead.  Policy CMP0169 can be set to
  OLD to allow FetchContent_Populate(glaze) to be called directly for now,
  but the ability to call it with declared details will be removed completely
  in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  CMakeLists.txt:422 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

Glaze is being compiled with AVX2 instructions. Set glaze_ENABLE_AVX2 to OFF if you wish to disable this.
-- Performing Test COMPILER_SUPPORTS_AVX2_FLAG
-- Performing Test COMPILER_SUPPORTS_AVX2_FLAG - Success
-- Performing Test AVX2_CODE_COMPILES
-- Performing Test AVX2_CODE_COMPILES - Success
-- Glaze: using AVX2 intrinsics. Set glaze_ENABLE_AVX2 to OFF to avoid use.
-- [saucer] Building Examples
-- CPM: Adding package saucer-desktop@2.0.0 (v2.0.0)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(saucer-desktop) is deprecated, call
  FetchContent_MakeAvailable(saucer-desktop) instead.  Policy CMP0169 can be
  set to OLD to allow FetchContent_Populate(saucer-desktop) to be called
  directly for now, but the ability to call it with declared details will be
  removed completely in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  examples/desktop/CMakeLists.txt:16 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- [saucer] Adding module: saucer-desktop
-- CPM: Adding package saucer-pdf@1.0.1 (v1.0.1)
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
  Calling FetchContent_Populate(saucer-pdf) is deprecated, call
  FetchContent_MakeAvailable(saucer-pdf) instead.  Policy CMP0169 can be set
  to OLD to allow FetchContent_Populate(saucer-pdf) to be called directly for
  now, but the ability to call it with declared details will be removed
  completely in a future version.
Call Stack (most recent call first):
  build/cmake/CPM_0.40.4.cmake:1133 (FetchContent_Populate)
  build/cmake/CPM_0.40.4.cmake:911 (cpm_fetch_package)
  build/cmake/CPM_0.40.4.cmake:313 (CPMAddPackage)
  examples/pdf/CMakeLists.txt:16 (CPMFindPackage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- [saucer] Adding module: saucer-pdf
-- Configuring done (74.4s)
-- Generating done (0.3s)
-- Build files have been written to: C:/Users/vt/Documents/saucer/build

C:\Users\vt\Documents\saucer\build>nmake

Microsoft (R) Program Maintenance Utility Version 14.43.34810.0
Copyright (C) Microsoft Corporation.  All rights reserved.

[  2%] Building CXX object _deps/fmt-build/CMakeFiles/fmt.dir/src/format.cc.obj
format.cc
[  5%] Building CXX object _deps/fmt-build/CMakeFiles/fmt.dir/src/os.cc.obj
os.cc
[  8%] Linking CXX static library fmtd.lib
[  8%] Built target fmt
[ 11%] Building CXX object CMakeFiles/saucer.dir/src/module/unstable.cpp.obj
unstable.cpp
[ 13%] Building CXX object CMakeFiles/saucer.dir/src/app.cpp.obj
app.cpp
[ 16%] Building CXX object CMakeFiles/saucer.dir/src/window.cpp.obj
window.cpp
[ 19%] Building CXX object CMakeFiles/saucer.dir/src/webview.cpp.obj
webview.cpp
[ 22%] Building CXX object CMakeFiles/saucer.dir/src/smartview.cpp.obj
smartview.cpp
[ 25%] Building CXX object CMakeFiles/saucer.dir/src/module/wv2.module.stable.cpp.obj
wv2.module.stable.cpp
[ 27%] Building CXX object CMakeFiles/saucer.dir/src/win32.app.cpp.obj
win32.app.cpp
[ 30%] Building CXX object CMakeFiles/saucer.dir/src/win32.app.impl.cpp.obj
win32.app.impl.cpp
[ 33%] Building CXX object CMakeFiles/saucer.dir/src/win32.icon.cpp.obj
win32.icon.cpp
[ 36%] Building CXX object CMakeFiles/saucer.dir/src/win32.utils.cpp.obj
win32.utils.cpp
[ 38%] Building CXX object CMakeFiles/saucer.dir/src/win32.window.cpp.obj
win32.window.cpp
[ 41%] Building CXX object CMakeFiles/saucer.dir/src/win32.window.impl.cpp.obj
win32.window.impl.cpp
[ 44%] Building CXX object CMakeFiles/saucer.dir/src/wv2.navigation.cpp.obj
wv2.navigation.cpp
[ 47%] Building CXX object CMakeFiles/saucer.dir/src/wv2.scheme.cpp.obj
wv2.scheme.cpp
[ 50%] Building CXX object CMakeFiles/saucer.dir/src/wv2.webview.cpp.obj
wv2.webview.cpp
[ 52%] Building CXX object CMakeFiles/saucer.dir/src/wv2.webview.impl.cpp.obj
wv2.webview.impl.cpp
[ 55%] Building CXX object CMakeFiles/saucer.dir/src/glaze.requests.cpp.obj
glaze.requests.cpp
[ 58%] Building CXX object CMakeFiles/saucer.dir/src/glaze.serializer.cpp.obj
glaze.serializer.cpp
[ 61%] Linking CXX static library saucer.lib
[ 61%] Built target saucer
[ 63%] Building CXX object examples/json-bridge/CMakeFiles/json_bridge_example.dir/main.cpp.obj
main.cpp
[ 66%] Linking CXX executable json_bridge_example.exe
[ 66%] Built target json_bridge_example
[ 69%] Building CXX object examples/embedding/CMakeFiles/embedding.dir/src/main.cpp.obj
main.cpp
[ 72%] Linking CXX executable embedding.exe
[ 72%] Built target embedding
[ 75%] Building CXX object _deps/saucer-desktop-build/CMakeFiles/saucer-desktop.dir/src/desktop.cpp.obj
desktop.cpp
[ 77%] Building CXX object _deps/saucer-desktop-build/CMakeFiles/saucer-desktop.dir/src/win32.desktop.cpp.obj
win32.desktop.cpp
[ 80%] Linking CXX static library saucer-desktop.lib
[ 80%] Built target saucer-desktop
[ 83%] Building CXX object examples/desktop/CMakeFiles/desktop_example.dir/main.cpp.obj
main.cpp
[ 86%] Linking CXX executable desktop_example.exe
[ 86%] Built target desktop_example
[ 88%] Building CXX object _deps/saucer-pdf-build/CMakeFiles/saucer-pdf.dir/src/pdf.cpp.obj
pdf.cpp
[ 91%] Building CXX object _deps/saucer-pdf-build/CMakeFiles/saucer-pdf.dir/src/wv2.pdf.cpp.obj
wv2.pdf.cpp
[ 94%] Linking CXX static library saucer-pdf.lib
[ 94%] Built target saucer-pdf
[ 97%] Building CXX object examples/pdf/CMakeFiles/pdf_example.dir/main.cpp.obj
main.cpp
[100%] Linking CXX executable pdf_example.exe
[100%] Built target pdf_example

C:\Users\vt\Documents\saucer\build>

C:\Users\vt\Documents\saucer\build>git status
HEAD detached at v6.0.1
nothing to commit, working tree clean

C:\Users\vt\Documents\saucer\build>ver

Microsoft Windows [Version 10.0.26100.3775]

C:\Users\vt\Documents\saucer\build>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.43.34810 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

C:\Users\vt\Documents\saucer\build>

❔ Expected behavior

examples should work or provide some debug error output

👀 Screenshots

See description

🛸 Saucer Version

v6.0.1

🖥️ Operating System

Windows 11

🧰 Compiler

Microsoft Visual Studio Community 2022 (64-bit) 17.13.6

📦 Environment

Bundled WebView2 (Windows 11 24H2)

🖥️ Distribution

No response

✅ I confirm that…

  • I have collected all the required information and read all the comments in this document
  • I searched for an existing bug report for this issue
  • the problem does occur with the reproduction steps I provided
  • what I described is indeed a problem

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Edit menu issue on macOS (“Paste” on non-input area) happens with third-party controls, so nothing to fix there.

Switching to master fixes the issue. Related glaze changes