Skip to content
Snippets Groups Projects
Commit 1ef9a851 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Sébastien Blin
Browse files

QWK: enforce a min Qt version of 6.6.2 on Windows

This will prevent a graphical issue present when disabling QWINDOWKIT_ENABLE_WINDOWS_SYSTEM_BORDERS to avoid the Windows 10 top border issue for the frameless window option. This allows us to remove the temp workaround that likely introduces side effects.

Gitlab: #1581
Change-Id: I36801064d31e2380312d73f88233e8ed9b757403
parent 072eafba
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,6 @@ list(APPEND QWINDOWKIT_OPTIONS
)
if(WIN32)
list(APPEND QWINDOWKIT_PATCHES ${EXTRA_PATCHES_DIR}/0002-workaround-right-margin.patch)
list(APPEND QWINDOWKIT_OPTIONS QWINDOWKIT_ENABLE_WINDOWS_SYSTEM_BORDERS OFF)
endif()
......@@ -140,6 +139,11 @@ else()
find_package(QT NAMES Qt6 REQUIRED)
endif()
if (${QT_VERSION_MINOR} GREATER_EQUAL ${QT6_MINVER_MINOR})
# Enforce a minimum Qt version of 6.6.2 for the Windows build
# https://github.com/stdware/qwindowkit/issues/23
if(MSVC AND ${QT_VERSION_MINOR} EQUAL 6 AND ${QT_VERSION_PATCH} LESS 2)
message(FATAL_ERROR "Qt 6.6.2 or higher is required. Found ${QT_VERSION}")
endif()
# Qt version is 6.6 or higher
message(STATUS "Found a suitable Qt version ${QT_VERSION}")
else()
......
......@@ -212,7 +212,7 @@ Only 64-bit MSVC build can be compiled.
| | Qt Version |
| -------------------- | ---------- |
| Minimum requirement: | 6.6.1 |
| Minimum requirement: | 6.6.2 |
- Install [Python3](https://www.python.org/downloads/) for Windows
......@@ -238,7 +238,7 @@ Only 64-bit MSVC build can be compiled.
- Using a new **Non-Elevated Command Prompt**
```bash
python build.py --install --qt <path-to-qt-bin-folder> (e.g. C:/Qt/6.6.1/msvc2019_64)
python build.py --install --qt <path-to-qt-bin-folder> (e.g. C:/Qt/6.6.2/msvc2019_64)
```
> **SDK** Note:
......@@ -281,7 +281,7 @@ Once the build has finished, you should then be able to use the Visual Studio So
```
python extras\scripts\build-windows.py --init
python extras\scripts\build-windows.py --qt <path-to-qt-bin-folder> (e.g. C:/Qt/6.6.1/msvc2019_64)
python extras\scripts\build-windows.py --qt <path-to-qt-bin-folder> (e.g. C:/Qt/6.6.2/msvc2019_64)
```
## Building On MacOS
......
From ca2be6466c150d1b82a646d97b27df35b45d90f1 Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Tue, 9 Jan 2024 15:25:19 -0500
Subject: [PATCH] workaround right margin
---
src/core/contexts/win32windowcontext.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/core/contexts/win32windowcontext.cpp b/src/core/contexts/win32windowcontext.cpp
index 3f6623e..9ee7752 100644
--- a/src/core/contexts/win32windowcontext.cpp
+++ b/src/core/contexts/win32windowcontext.cpp
@@ -402,6 +402,17 @@ namespace QWK {
return true;
}
}
+
+#if !QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDERS)
+ if (msg->message == WM_MOVE || msg->message == WM_SIZE ||
+ (msg->message == WM_IME_SETCONTEXT && (GetForegroundWindow() == msg->hwnd))) {
+ static const auto flags = SWP_FRAMECHANGED | SWP_NOMOVE |
+ SWP_NOSIZE | SWP_NOZORDER |
+ SWP_NOOWNERZORDER;
+ SetWindowPos(msg->hwnd, NULL, 0, 0, 0, 0, flags);
+ }
+#endif
+
return false;
}
--
2.7.4
......@@ -28,7 +28,7 @@ mutually exclusive required arguments:
-z, --zip Build portable archive
examples:
1. build.py --qt=C:/Qt/6.6.1/msvc2019_64 # Build the app using a specific Qt
1. build.py --qt=C:/Qt/6.6.2/msvc2019_64 # Build the app using a specific Qt
2. build.py --init pack --msi # Build the app and an MSI installer
3. build.py --init --tests # Build the app and run tests
build.py pack --zip --skip-build # Generate a 7z archive of the app
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment