diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4378fb..234935d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,13 @@ name: CI -# Work happens on dev and lands on main with `git promote`, so main is the only branch worth -# spending runners on. workflow_dispatch is there to repeat a run without pushing. +# Work happens on dev and lands on main with `git promote` or through a pull request, so main and +# the pull requests against it are the only places worth spending runners on. workflow_dispatch is +# there to repeat a run without pushing. on: push: branches: [ main ] + pull_request: + branches: [ main ] workflow_dispatch: jobs: @@ -74,6 +77,30 @@ jobs: arch: ${{ matrix.qt_arch }} cache: true + # The MSVC STL requires a minimum Clang version, which follows the Clang that Visual Studio + # ships, and rejects an older compiler with STL1000. The standalone LLVM of the runner image + # precedes the LLVM of Visual Studio on the path and lags behind it. MSVC 14.52 broke this + # job that way, therefore the job puts the LLVM of Visual Studio first. + - name: Use the clang-cl of Visual Studio + if: matrix.platform == 'windows-clang-cl' + shell: bash + run: | + llvm_bin="$(cygpath -u "$VCINSTALLDIR")/Tools/Llvm/x64/bin" + test -x "$llvm_bin/clang-cl.exe" + cygpath -w "$llvm_bin" >> "$GITHUB_PATH" + + - name: Check the clang-cl in use + if: matrix.platform == 'windows-clang-cl' + shell: bash + run: | + compiler="$(command -v clang-cl)" + echo "$compiler" + clang-cl --version + case "$compiler" in + */VC/Tools/Llvm/x64/bin/*) ;; + *) echo "clang-cl is not the one of Visual Studio"; exit 1 ;; + esac + # Everything on, so that each job compiles all three libraries and both examples. The # examples are the only thing here that uses the public API the way a caller does. - name: Configure diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp index 5741f12..ebaa63d 100644 --- a/src/core/contexts/win32windowcontext.cpp +++ b/src/core/contexts/win32windowcontext.cpp @@ -541,8 +541,9 @@ namespace QWK { // Win+Up or snapping) and native child windows then receive WM_NCCALCSIZE // too. They must keep the default handling, otherwise they get the top-level // frame adjustments and their client area is shifted. + // See https://github.com/stdware/qwindowkit/issues/256 if (lastMessageContext && - g_wndProcHash->value(msg->hwnd) == lastMessageContext) { + reinterpret_cast(lastMessageContext->windowId()) == msg->hwnd) { LRESULT res; if (lastMessageContext->nonClientCalcSizeHandler( msg->hwnd, msg->message, msg->wParam, msg->lParam, &res)) {